summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-vx855.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-vx855.c')
-rw-r--r--drivers/gpio/gpio-vx855.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-vx855.c b/drivers/gpio/gpio-vx855.c
index 57b470d5b..764999cc0 100644
--- a/drivers/gpio/gpio-vx855.c
+++ b/drivers/gpio/gpio-vx855.c
@@ -96,7 +96,7 @@ static inline u_int32_t gpio_o_bit(int i)
static int vx855gpio_direction_input(struct gpio_chip *gpio,
unsigned int nr)
{
- struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio);
+ struct vx855_gpio *vg = gpiochip_get_data(gpio);
unsigned long flags;
u_int32_t reg_out;
@@ -120,7 +120,7 @@ static int vx855gpio_direction_input(struct gpio_chip *gpio,
static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr)
{
- struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio);
+ struct vx855_gpio *vg = gpiochip_get_data(gpio);
u_int32_t reg_in;
int ret = 0;
@@ -146,7 +146,7 @@ static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr)
static void vx855gpio_set(struct gpio_chip *gpio, unsigned int nr,
int val)
{
- struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio);
+ struct vx855_gpio *vg = gpiochip_get_data(gpio);
unsigned long flags;
u_int32_t reg_out;
@@ -259,7 +259,7 @@ static int vx855gpio_probe(struct platform_device *pdev)
vx855gpio_gpio_setup(vg);
- return gpiochip_add(&vg->gpio);
+ return gpiochip_add_data(&vg->gpio, vg);
}
static int vx855gpio_remove(struct platform_device *pdev)