summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c')
-rw-r--r--arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index d119a7c1c17a..e49f4bd2f991 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -37,7 +37,7 @@ struct mcu {
struct mutex lock;
struct device_node *np;
struct i2c_client *client;
- struct of_gpio_chip of_gc;
+ struct gpio_chip gc;
u8 reg_ctrl;
};
@@ -56,8 +56,7 @@ static void mcu_power_off(void)
static void mcu_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
{
- struct of_gpio_chip *of_gc = to_of_gpio_chip(gc);
- struct mcu *mcu = container_of(of_gc, struct mcu, of_gc);
+ struct mcu *mcu = container_of(gc, struct mcu, gc);
u8 bit = 1 << (4 + gpio);
mutex_lock(&mcu->lock);
@@ -79,8 +78,7 @@ static int mcu_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
static int mcu_gpiochip_add(struct mcu *mcu)
{
struct device_node *np;
- struct of_gpio_chip *of_gc = &mcu->of_gc;
- struct gpio_chip *gc = &of_gc->gc;
+ struct gpio_chip *gc = &mcu->gc;
int ret;
np = of_find_compatible_node(NULL, NULL, "fsl,mcu-mpc8349emitx");
@@ -94,10 +92,9 @@ static int mcu_gpiochip_add(struct mcu *mcu)
gc->base = -1;
gc->set = mcu_gpio_set;
gc->direction_output = mcu_gpio_dir_out;
- of_gc->gpio_cells = 2;
- of_gc->xlate = of_gpio_simple_xlate;
+ gc->of_gpio_n_cells = 2;
+ gc->of_xlate = of_gpio_simple_xlate;
- np->data = of_gc;
mcu->np = np;
/*
@@ -114,7 +111,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu)
{
int ret;
- ret = gpiochip_remove(&mcu->of_gc.gc);
+ ret = gpiochip_remove(&mcu->gc);
if (ret)
return ret;
of_node_put(mcu->np);
OpenPOWER on IntegriCloud