hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/input/touchscreen/mxs-lradc-ts.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Freescale MXS LRADC touchscreen driver
34 *
....@@ -7,16 +8,6 @@
78 * Authors:
89 * Marek Vasut <marex@denx.de>
910 * Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
2011 */
2112
2213 #include <linux/device.h>
....@@ -615,7 +606,6 @@
615606 struct device_node *node = dev->parent->of_node;
616607 struct mxs_lradc *lradc = dev_get_drvdata(dev->parent);
617608 struct mxs_lradc_ts *ts;
618
- struct resource *iores;
619609 int ret, irq, virq, i;
620610 u32 ts_wires = 0, adapt;
621611
....@@ -629,12 +619,9 @@
629619 ts->dev = dev;
630620 spin_lock_init(&ts->lock);
631621
632
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
633
- if (!iores)
634
- return -EINVAL;
635
- ts->base = devm_ioremap(dev, iores->start, resource_size(iores));
636
- if (!ts->base)
637
- return -ENOMEM;
622
+ ts->base = devm_platform_ioremap_resource(pdev, 0);
623
+ if (IS_ERR(ts->base))
624
+ return PTR_ERR(ts->base);
638625
639626 ret = of_property_read_u32(node, "fsl,lradc-touchscreen-wires",
640627 &ts_wires);