hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/gpio/gpio-iop.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * arch/arm/plat-iop/gpio.c
34 * GPIO handling for Intel IOP3xx processors.
45 *
56 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or (at
10
- * your option) any later version.
117 */
128
139 #include <linux/err.h>
....@@ -21,7 +17,6 @@
2117
2218 static int iop3xx_gpio_probe(struct platform_device *pdev)
2319 {
24
- struct resource *res;
2520 struct gpio_chip *gc;
2621 void __iomem *base;
2722 int err;
....@@ -30,8 +25,7 @@
3025 if (!gc)
3126 return -ENOMEM;
3227
33
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
34
- base = devm_ioremap_resource(&pdev->dev, res);
28
+ base = devm_platform_ioremap_resource(pdev, 0);
3529 if (IS_ERR(base))
3630 return PTR_ERR(base);
3731
....@@ -42,6 +36,7 @@
4236
4337 gc->base = 0;
4438 gc->owner = THIS_MODULE;
39
+ gc->label = "gpio-iop";
4540
4641 return devm_gpiochip_add_data(&pdev->dev, gc, NULL);
4742 }