diff options
Diffstat (limited to 'drivers/sh/pfc/gpio.c')
-rw-r--r-- | drivers/sh/pfc/gpio.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/sh/pfc/gpio.c b/drivers/sh/pfc/gpio.c index 6a24f07c2013..7597a024fac8 100644 --- a/drivers/sh/pfc/gpio.c +++ b/drivers/sh/pfc/gpio.c | |||
@@ -103,11 +103,11 @@ static int sh_gpio_to_irq(struct gpio_chip *gc, unsigned offset) | |||
103 | if (pos <= 0 || !enum_id) | 103 | if (pos <= 0 || !enum_id) |
104 | break; | 104 | break; |
105 | 105 | ||
106 | for (i = 0; i < pfc->gpio_irq_size; i++) { | 106 | for (i = 0; i < pfc->pdata->gpio_irq_size; i++) { |
107 | enum_ids = pfc->gpio_irq[i].enum_ids; | 107 | enum_ids = pfc->pdata->gpio_irq[i].enum_ids; |
108 | for (k = 0; enum_ids[k]; k++) { | 108 | for (k = 0; enum_ids[k]; k++) { |
109 | if (enum_ids[k] == enum_id) | 109 | if (enum_ids[k] == enum_id) |
110 | return pfc->gpio_irq[i].irq; | 110 | return pfc->pdata->gpio_irq[i].irq; |
111 | } | 111 | } |
112 | } | 112 | } |
113 | } | 113 | } |
@@ -128,12 +128,12 @@ static void sh_pfc_gpio_setup(struct sh_pfc_chip *chip) | |||
128 | gc->set = sh_gpio_set; | 128 | gc->set = sh_gpio_set; |
129 | gc->to_irq = sh_gpio_to_irq; | 129 | gc->to_irq = sh_gpio_to_irq; |
130 | 130 | ||
131 | WARN_ON(pfc->first_gpio != 0); /* needs testing */ | 131 | WARN_ON(pfc->pdata->first_gpio != 0); /* needs testing */ |
132 | 132 | ||
133 | gc->label = pfc->name; | 133 | gc->label = pfc->pdata->name; |
134 | gc->owner = THIS_MODULE; | 134 | gc->owner = THIS_MODULE; |
135 | gc->base = pfc->first_gpio; | 135 | gc->base = pfc->pdata->first_gpio; |
136 | gc->ngpio = (pfc->last_gpio - pfc->first_gpio) + 1; | 136 | gc->ngpio = (pfc->pdata->last_gpio - pfc->pdata->first_gpio) + 1; |
137 | } | 137 | } |
138 | 138 | ||
139 | int sh_pfc_register_gpiochip(struct sh_pfc *pfc) | 139 | int sh_pfc_register_gpiochip(struct sh_pfc *pfc) |
@@ -154,7 +154,8 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc) | |||
154 | kfree(chip); | 154 | kfree(chip); |
155 | 155 | ||
156 | pr_info("%s handling gpio %d -> %d\n", | 156 | pr_info("%s handling gpio %d -> %d\n", |
157 | pfc->name, pfc->first_gpio, pfc->last_gpio); | 157 | pfc->pdata->name, pfc->pdata->first_gpio, |
158 | pfc->pdata->last_gpio); | ||
158 | 159 | ||
159 | return ret; | 160 | return ret; |
160 | } | 161 | } |
@@ -179,7 +180,7 @@ static int sh_pfc_gpio_probe(struct platform_device *pdev) | |||
179 | chip = gpio_to_pfc_chip(gc); | 180 | chip = gpio_to_pfc_chip(gc); |
180 | platform_set_drvdata(pdev, chip); | 181 | platform_set_drvdata(pdev, chip); |
181 | 182 | ||
182 | pr_info("attaching to GPIO chip %s\n", chip->pfc->name); | 183 | pr_info("attaching to GPIO chip %s\n", chip->pfc->pdata->name); |
183 | 184 | ||
184 | return 0; | 185 | return 0; |
185 | } | 186 | } |