forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/zte/pinctrl-zx.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2017 Sanechips Technology Co., Ltd.
34 * Copyright 2017 Linaro Ltd.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
85 */
96
107 #include <linux/io.h>
....@@ -97,7 +94,7 @@
9794 if (data->aon_pin) {
9895 /*
9996 * It's an AON pin, whose mux register offset and bit position
100
- * can be caluculated from pin number. Each register covers 16
97
+ * can be calculated from pin number. Each register covers 16
10198 * pins, and each pin occupies 2 bits.
10299 */
103100 u16 aoffset = pindesc->number / 16 * 4;
....@@ -390,7 +387,6 @@
390387 struct pinctrl_desc *pctldesc;
391388 struct zx_pinctrl *zpctl;
392389 struct device_node *np;
393
- struct resource *res;
394390 int ret;
395391
396392 zpctl = devm_kzalloc(&pdev->dev, sizeof(*zpctl), GFP_KERNEL);
....@@ -399,8 +395,7 @@
399395
400396 spin_lock_init(&zpctl->lock);
401397
402
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
403
- zpctl->base = devm_ioremap_resource(&pdev->dev, res);
398
+ zpctl->base = devm_platform_ioremap_resource(pdev, 0);
404399 if (IS_ERR(zpctl->base))
405400 return PTR_ERR(zpctl->base);
406401