diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index d3f525f333..023c9673ba 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * TI OMAP I2C master mode driver * @@ -12,16 +13,6 @@ * Juha Yrjölä <juha.yrjola@solidboot.com> * Syed Khasim <x0khasim@ti.com> * Nishant Menon <nm@ti.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #include <clock.h> @@ -37,8 +28,8 @@ #include <io.h> #include <i2c/i2c.h> -#include <mach/generic.h> -#include <mach/omap3-clock.h> +#include <mach/omap/generic.h> +#include <mach/omap/omap3-clock.h> /* This will be the driver name */ #define DRIVER_NAME "i2c-omap" @@ -1068,7 +1059,7 @@ static struct i2c_bus_recovery_info omap_i2c_bus_recovery_info = { }; static int __init -i2c_omap_probe(struct device_d *pdev) +i2c_omap_probe(struct device *pdev) { struct resource *iores; struct omap_i2c_struct *i2c_omap; @@ -1100,8 +1091,8 @@ i2c_omap_probe(struct device_d *pdev) if (pdev->platform_data != NULL) { speed = *(u32 *)pdev->platform_data; } else { - of_property_read_u32(pdev->device_node, "clock-frequency", - &speed); + of_property_read_u32(pdev->of_node, "clock-frequency", + &speed); /* convert DT freq value in Hz into kHz for speed */ speed /= 1000; } @@ -1179,7 +1170,7 @@ i2c_omap_probe(struct device_d *pdev) i2c_omap->adapter.master_xfer = omap_i2c_xfer; i2c_omap->adapter.nr = pdev->id; i2c_omap->adapter.dev.parent = pdev; - i2c_omap->adapter.dev.device_node = pdev->device_node; + i2c_omap->adapter.dev.of_node = pdev->of_node; i2c_omap->adapter.bus_recovery_info = &omap_i2c_bus_recovery_info; /* i2c device drivers may be active on return from add_adapter() */ @@ -1228,8 +1219,9 @@ static __maybe_unused struct of_device_id omap_i2c_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, omap_i2c_dt_ids); -static struct driver_d omap_i2c_driver = { +static struct driver omap_i2c_driver = { .probe = i2c_omap_probe, .name = DRIVER_NAME, .id_table = omap_i2c_ids, |