|
@@ -603,7 +603,7 @@ static int tca6507_blink_set(struct led_classdev *led_cdev,
|
|
|
static void tca6507_gpio_set_value(struct gpio_chip *gc,
|
|
|
unsigned offset, int val)
|
|
|
{
|
|
|
- struct tca6507_chip *tca = container_of(gc, struct tca6507_chip, gpio);
|
|
|
+ struct tca6507_chip *tca = gpiochip_get_data(gc);
|
|
|
unsigned long flags;
|
|
|
|
|
|
spin_lock_irqsave(&tca->lock, flags);
|
|
@@ -655,7 +655,7 @@ static int tca6507_probe_gpios(struct i2c_client *client,
|
|
|
#ifdef CONFIG_OF_GPIO
|
|
|
tca->gpio.of_node = of_node_get(client->dev.of_node);
|
|
|
#endif
|
|
|
- err = gpiochip_add(&tca->gpio);
|
|
|
+ err = gpiochip_add_data(&tca->gpio, tca);
|
|
|
if (err) {
|
|
|
tca->gpio.ngpio = 0;
|
|
|
return err;
|