diff options
Diffstat (limited to 'drivers/reset/reset-ath79.c')
| -rw-r--r-- | drivers/reset/reset-ath79.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c index 2674880e5492..b5d620132052 100644 --- a/drivers/reset/reset-ath79.c +++ b/drivers/reset/reset-ath79.c @@ -1,22 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * AR71xx Reset Controller Driver * Author: Alban Bedel * * Copyright (C) 2015 Alban Bedel <albeu@free.fr> - * - * 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 <linux/io.h> #include <linux/init.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/reboot.h> @@ -94,7 +86,6 @@ static int ath79_reset_restart_handler(struct notifier_block *nb, static int ath79_reset_probe(struct platform_device *pdev) { struct ath79_reset *ath79_reset; - struct resource *res; int err; ath79_reset = devm_kzalloc(&pdev->dev, @@ -102,10 +93,7 @@ static int ath79_reset_probe(struct platform_device *pdev) if (!ath79_reset) return -ENOMEM; - platform_set_drvdata(pdev, ath79_reset); - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ath79_reset->base = devm_ioremap_resource(&pdev->dev, res); + ath79_reset->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ath79_reset->base)) return PTR_ERR(ath79_reset->base); |
