hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
kernel/drivers/gpio/gpio-clps711x.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * CLPS711X GPIO driver
34 *
45 * Copyright (C) 2012,2013 Alexander Shiyan <shc_work@mail.ru>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117
128 #include <linux/err.h>
....@@ -19,7 +15,6 @@
1915 struct device_node *np = pdev->dev.of_node;
2016 void __iomem *dat, *dir;
2117 struct gpio_chip *gc;
22
- struct resource *res;
2318 int err, id;
2419
2520 if (!np)
....@@ -33,13 +28,11 @@
3328 if (!gc)
3429 return -ENOMEM;
3530
36
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
37
- dat = devm_ioremap_resource(&pdev->dev, res);
31
+ dat = devm_platform_ioremap_resource(pdev, 0);
3832 if (IS_ERR(dat))
3933 return PTR_ERR(dat);
4034
41
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
42
- dir = devm_ioremap_resource(&pdev->dev, res);
35
+ dir = devm_platform_ioremap_resource(pdev, 1);
4336 if (IS_ERR(dir))
4437 return PTR_ERR(dir);
4538