diff options
Diffstat (limited to 'drivers/gpio/gpio-pcf857x.c')
-rw-r--r-- | drivers/gpio/gpio-pcf857x.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c index fefd20de6f..52c3a6d00a 100644 --- a/drivers/gpio/gpio-pcf857x.c +++ b/drivers/gpio/gpio-pcf857x.c @@ -145,10 +145,10 @@ static struct gpio_ops pcf857x_gpio_ops = { .set = pcf857x_set, }; -static int pcf857x_probe(struct device_d *dev) +static int pcf857x_probe(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - struct device_node *np = dev->device_node; + struct device_node *np = dev->of_node; struct pcf857x *gpio; unsigned long driver_data; unsigned int n_latch = 0; @@ -219,11 +219,7 @@ static int pcf857x_probe(struct device_d *dev) */ gpio->out = ~n_latch; - ret = gpiochip_add(&gpio->chip); - if (ret) - return ret; - - return ret; + return gpiochip_add(&gpio->chip); } static const struct of_device_id pcf857x_dt_ids[] = { @@ -242,8 +238,9 @@ static const struct of_device_id pcf857x_dt_ids[] = { { .compatible = "maxim,max7329", .data = (void *)8 }, { } }; +MODULE_DEVICE_TABLE(of, pcf857x_dt_ids); -static struct driver_d pcf857x_driver = { +static struct driver pcf857x_driver = { .name = "pcf857x", .probe = pcf857x_probe, .of_compatible = DRV_OF_COMPAT(pcf857x_dt_ids), |