diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-designware.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 8508fac717..152b795c37 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Synopsys DesignWare I2C adapter driver (master only). * @@ -10,16 +11,6 @@ * Copyright (C) 2009 Provigent Ltd. * * Copyright (C) 2015 Andrey Smirnov <andrew.smirnov@gmail.com> - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * 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> @@ -254,7 +245,7 @@ static void i2c_dw_setup_timings(struct dw_i2c_dev *dw) u32 ht; int ret; - ret = of_property_read_u32(dw->adapter.dev.device_node, + ret = of_property_read_u32(dw->adapter.dev.of_node, "i2c-sda-hold-time-ns", &ht); if (ret) { /* Keep previous hold time setting if no one set it */ @@ -513,7 +504,7 @@ static int i2c_dw_xfer(struct i2c_adapter *adapter, } -static int i2c_dw_probe(struct device_d *pdev) +static int i2c_dw_probe(struct device *pdev) { struct resource *iores; struct dw_i2c_dev *dw; @@ -536,7 +527,7 @@ static int i2c_dw_probe(struct device_d *pdev) dw->adapter.master_xfer = i2c_dw_xfer; dw->adapter.nr = pdev->id; dw->adapter.dev.parent = pdev; - dw->adapter.dev.device_node = pdev->device_node; + dw->adapter.dev.of_node = pdev->of_node; iores = dev_request_mem_resource(pdev, 0); if (IS_ERR(iores)) { @@ -608,8 +599,9 @@ static __maybe_unused struct of_device_id i2c_dw_dt_ids[] = { { .compatible = "snps,designware-i2c", }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, i2c_dw_dt_ids); -static struct driver_d i2c_dw_driver = { +static struct driver i2c_dw_driver = { .probe = i2c_dw_probe, .name = "i2c-designware", .of_compatible = DRV_OF_COMPAT(i2c_dw_dt_ids), |