diff options
Diffstat (limited to 'drivers/i2c/muxes/i2c-mux-pca954x.c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pca954x.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index aa7dcb8c31..6c21b92860 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * I2C multiplexer * @@ -32,10 +33,6 @@ * i2c-virtual_cb.c from Brian Kuschak <bkuschak@yahoo.com> * and * pca9540.c from Jean Delvare <jdelvare@suse.de>. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. */ #include <common.h> @@ -183,7 +180,7 @@ static int pca954x_deselect_chan(struct i2c_adapter *adap, /* * I2C init/probing/exit functions */ -static int pca954x_probe(struct device_d *dev) +static int pca954x_probe(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); @@ -202,7 +199,7 @@ static int pca954x_probe(struct device_d *dev) i2c_set_clientdata(client, data); - gpio = of_get_named_gpio(dev->device_node, "reset-gpios", 0); + gpio = of_get_named_gpio(dev->of_node, "reset-gpios", 0); if (gpio_is_valid(gpio)) gpio_direction_output(gpio, 1); @@ -210,17 +207,15 @@ static int pca954x_probe(struct device_d *dev) * that the mux is in fact present. This also * initializes the mux to disconnected state. */ - if (i2c_smbus_write_byte(client, 0) < 0) { - dev_warn(&client->dev, "probe failed\n"); + if (i2c_smbus_write_byte(client, 0) < 0) goto exit_free; - } ret = dev_get_drvdata(dev, (const void **)&tmp); data->type = tmp; if (ret) goto exit_free; - idle_disconnect = of_property_read_bool(dev->device_node, + idle_disconnect = of_property_read_bool(dev->of_node, "i2c-mux-idle-disconnect"); data->last_chan = 0; /* force the first selection */ @@ -260,7 +255,7 @@ err: return ret; } -static struct driver_d pca954x_driver = { +static struct driver pca954x_driver = { .name = "pca954x", .probe = pca954x_probe, .id_table = pca954x_id, |