aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/reset.c')
-rw-r--r--arch/microblaze/kernel/reset.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c
index a1721a33042e..bd8ccab5ceff 100644
--- a/arch/microblaze/kernel/reset.c
+++ b/arch/microblaze/kernel/reset.c
@@ -24,8 +24,8 @@ static int of_reset_gpio_handle(void)
24 int ret; /* variable which stored handle reset gpio pin */ 24 int ret; /* variable which stored handle reset gpio pin */
25 struct device_node *root; /* root node */ 25 struct device_node *root; /* root node */
26 struct device_node *gpio; /* gpio node */ 26 struct device_node *gpio; /* gpio node */
27 struct of_gpio_chip *of_gc = NULL; 27 struct gpio_chip *gc;
28 enum of_gpio_flags flags ; 28 u32 flags;
29 const void *gpio_spec; 29 const void *gpio_spec;
30 30
31 /* find out root node */ 31 /* find out root node */
@@ -39,19 +39,19 @@ static int of_reset_gpio_handle(void)
39 goto err0; 39 goto err0;
40 } 40 }
41 41
42 of_gc = gpio->data; 42 gc = of_node_to_gpiochip(gpio);
43 if (!of_gc) { 43 if (!gc) {
44 pr_debug("%s: gpio controller %s isn't registered\n", 44 pr_debug("%s: gpio controller %s isn't registered\n",
45 root->full_name, gpio->full_name); 45 root->full_name, gpio->full_name);
46 ret = -ENODEV; 46 ret = -ENODEV;
47 goto err1; 47 goto err1;
48 } 48 }
49 49
50 ret = of_gc->xlate(of_gc, root, gpio_spec, &flags); 50 ret = gc->of_xlate(gc, root, gpio_spec, &flags);
51 if (ret < 0) 51 if (ret < 0)
52 goto err1; 52 goto err1;
53 53
54 ret += of_gc->gc.base; 54 ret += gc->base;
55err1: 55err1:
56 of_node_put(gpio); 56 of_node_put(gpio);
57err0: 57err0: