hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/i2c/busses/i2c-davinci.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * TI DAVINCI I2C adapter driver.
34 *
....@@ -8,17 +9,7 @@
89 *
910 * ----------------------------------------------------------------------------
1011 *
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.
2012 * ----------------------------------------------------------------------------
21
- *
2213 */
2314 #include <linux/kernel.h>
2415 #include <linux/module.h>
....@@ -770,7 +761,6 @@
770761 {
771762 struct davinci_i2c_dev *dev;
772763 struct i2c_adapter *adap;
773
- struct resource *mem;
774764 struct i2c_bus_recovery_info *rinfo;
775765 int r, irq;
776766
....@@ -823,8 +813,7 @@
823813 if (IS_ERR(dev->clk))
824814 return PTR_ERR(dev->clk);
825815
826
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
827
- dev->base = devm_ioremap_resource(&pdev->dev, mem);
816
+ dev->base = devm_platform_ioremap_resource(pdev, 0);
828817 if (IS_ERR(dev->base)) {
829818 return PTR_ERR(dev->base);
830819 }