diff options
Diffstat (limited to 'drivers/mfd/da9053.c')
-rw-r--r-- | drivers/mfd/da9053.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/mfd/da9053.c b/drivers/mfd/da9053.c index 1f32869038..cbfb62cef9 100644 --- a/drivers/mfd/da9053.c +++ b/drivers/mfd/da9053.c @@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Jan Luebbe <jlu@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> @@ -88,7 +77,7 @@ struct da9053_priv { struct watchdog wd; struct i2c_client *client; - struct device_d *dev; + struct device *dev; struct restart_handler restart; }; @@ -148,7 +137,7 @@ static int da9053_enable_multiwrite(struct da9053_priv *da9053) static int da9053_set_timeout(struct watchdog *wd, unsigned timeout) { struct da9053_priv *da9053 = wd_to_da9053_priv(wd); - struct device_d *dev = da9053->dev; + struct device *dev = da9053->dev; unsigned scale = 0; int ret; u8 val; @@ -262,7 +251,7 @@ static void __noreturn da9053_force_system_reset(struct restart_handler *rst) hang(); } -static int da9053_probe(struct device_d *dev) +static int da9053_probe(struct device *dev) { struct da9053_priv *da9053; int ret; @@ -283,7 +272,7 @@ static int da9053_probe(struct device_d *dev) da9053_detect_reset_source(da9053); - da9053->restart.priority = of_get_restart_priority(dev->device_node); + da9053->restart.of_node = dev->of_node; da9053->restart.name = "da9063"; da9053->restart.restart = &da9053_force_system_reset; @@ -299,8 +288,9 @@ static __maybe_unused struct of_device_id da9053_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, da9053_dt_ids); -static struct driver_d da9053_driver = { +static struct driver da9053_driver = { .name = DRIVERNAME, .probe = da9053_probe, .of_compatible = DRV_OF_COMPAT(da9053_dt_ids), |