hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/rc/tango-ir.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2015 Mans Rullgard <mans@mansr.com>
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License as published by the
6
- * Free Software Foundation; either version 2 of the License, or (at your
7
- * option) any later version.
84 */
95
106 #include <linux/input.h>
....@@ -161,19 +157,9 @@
161157 struct device *dev = &pdev->dev;
162158 struct rc_dev *rc;
163159 struct tango_ir *ir;
164
- struct resource *rc5_res;
165
- struct resource *rc6_res;
166160 u64 clkrate, clkdiv;
167161 int irq, err;
168162 u32 val;
169
-
170
- rc5_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
171
- if (!rc5_res)
172
- return -EINVAL;
173
-
174
- rc6_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
175
- if (!rc6_res)
176
- return -EINVAL;
177163
178164 irq = platform_get_irq(pdev, 0);
179165 if (irq <= 0)
....@@ -183,11 +169,11 @@
183169 if (!ir)
184170 return -ENOMEM;
185171
186
- ir->rc5_base = devm_ioremap_resource(dev, rc5_res);
172
+ ir->rc5_base = devm_platform_ioremap_resource(pdev, 0);
187173 if (IS_ERR(ir->rc5_base))
188174 return PTR_ERR(ir->rc5_base);
189175
190
- ir->rc6_base = devm_ioremap_resource(dev, rc6_res);
176
+ ir->rc6_base = devm_platform_ioremap_resource(pdev, 1);
191177 if (IS_ERR(ir->rc6_base))
192178 return PTR_ERR(ir->rc6_base);
193179