hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pinctrl/pinctrl-da850-pupd.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Pinconf driver for TI DA850/OMAP-L138/AM18XX pullup/pulldown groups
34 *
45 * Copyright (C) 2016 David Lechner
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the Free
8
- * Software Foundation; version 2 of the License.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
146 */
157
168 #include <linux/bitops.h>
....@@ -154,14 +146,12 @@
154146 {
155147 struct device *dev = &pdev->dev;
156148 struct da850_pupd_data *data;
157
- struct resource *res;
158149
159150 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
160151 if (!data)
161152 return -ENOMEM;
162153
163
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
164
- data->base = devm_ioremap_resource(dev, res);
154
+ data->base = devm_platform_ioremap_resource(pdev, 0);
165155 if (IS_ERR(data->base)) {
166156 dev_err(dev, "Could not map resource\n");
167157 return PTR_ERR(data->base);