diff options
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
-rw-r--r-- | drivers/regulator/anatop-regulator.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 917f7e8fdd..4b4c174304 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -1,27 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. */ -/* - * 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. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - #include <common.h> #include <init.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> struct anatop_regulator { @@ -48,9 +33,9 @@ static struct regulator_ops anatop_rops = { .list_voltage = regulator_list_voltage_linear, }; -static int anatop_regulator_probe(struct device_d *dev) +static int anatop_regulator_probe(struct device *dev) { - struct device_node *np = dev->device_node; + struct device_node *np = dev->of_node; struct device_node *anatop_np; struct regulator_desc *rdesc; struct regulator_dev *rdev; @@ -146,15 +131,16 @@ static int anatop_regulator_probe(struct device_d *dev) } } - return of_regulator_register(rdev, dev->device_node); + return of_regulator_register(rdev, dev->of_node); } static const struct of_device_id of_anatop_regulator_match_tbl[] = { { .compatible = "fsl,anatop-regulator", }, { /* end */ } }; +MODULE_DEVICE_TABLE(of, of_anatop_regulator_match_tbl); -static struct driver_d anatop_regulator_driver = { +static struct driver anatop_regulator_driver = { .name = "anatop_regulator", .probe = anatop_regulator_probe, .of_compatible = DRV_OF_COMPAT(of_anatop_regulator_match_tbl), |