diff options
Diffstat (limited to 'drivers/mfd/mc13xxx.c')
-rw-r--r-- | drivers/mfd/mc13xxx.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c index 1f321a3272..1e06a24b45 100644 --- a/drivers/mfd/mc13xxx.c +++ b/drivers/mfd/mc13xxx.c @@ -1,18 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2007 Sascha Hauer, Pengutronix * 2009 Marc Kleine-Budde <mkl@pengutronix.de> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * */ #include <common.h> @@ -22,7 +11,7 @@ #include <errno.h> #include <malloc.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <i2c/i2c.h> #include <spi/spi.h> @@ -33,7 +22,7 @@ #define MC13XXX_NUMREGS 0x3f struct mc13xxx { - struct device_d *dev; + struct device *dev; struct regmap *map; union { struct i2c_client *client; @@ -311,7 +300,7 @@ static const struct regmap_config mc13xxx_regmap_i2c_config = { }; #endif -static int __init mc13xxx_probe(struct device_d *dev) +static int __init mc13xxx_probe(struct device *dev) { struct mc13xxx_devtype *devtype; int ret, rev; @@ -364,7 +353,7 @@ static int __init mc13xxx_probe(struct device_d *dev) if (mc13xxx_init_callback) mc13xxx_init_callback(mc_dev); - if (of_property_read_bool(dev->device_node, "fsl,mc13xxx-uses-adc")) + if (of_property_read_bool(dev->of_node, "fsl,mc13xxx-uses-adc")) mc13xxx_adc_probe(dev, mc_dev); return 0; @@ -398,8 +387,9 @@ static __maybe_unused struct of_device_id mc13xxx_dt_ids[] = { { .compatible = "fsl,mc34708", .data = &mc34708_devtype, }, { } }; +MODULE_DEVICE_TABLE(of, mc13xxx_dt_ids); -static __maybe_unused struct driver_d mc13xxx_i2c_driver = { +static __maybe_unused struct driver mc13xxx_i2c_driver = { .name = "mc13xxx-i2c", .probe = mc13xxx_probe, .id_table = mc13xxx_ids, @@ -410,7 +400,7 @@ static __maybe_unused struct driver_d mc13xxx_i2c_driver = { coredevice_i2c_driver(mc13xxx_i2c_driver); #endif -static __maybe_unused struct driver_d mc13xxx_spi_driver = { +static __maybe_unused struct driver mc13xxx_spi_driver = { .name = "mc13xxx-spi", .probe = mc13xxx_probe, .id_table = mc13xxx_ids, |