aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-intel-mid.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-03-14 13:16:20 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-03-18 04:28:30 -0400
commit57ef04288abd27a717287a652d324f95cb77c3c6 (patch)
tree2cb5e15f0325e6860b008da5997e5f63d4cf6171 /drivers/gpio/gpio-intel-mid.c
parent1d4a2166f9501fd5b564b33414a2aa9c493fdfb8 (diff)
gpio: switch drivers to use new callback
This switches all GPIO and pin control drivers with irqchips that were using .startup() and .shutdown() callbacks to lock GPIO lines for IRQ usage over to using the .request_resources() and .release_resources() callbacks just introduced into the irqchip vtable. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jean-Jacques Hiblot <jjhiblot@traphandler.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-intel-mid.c')
-rw-r--r--drivers/gpio/gpio-intel-mid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
index 3a34bb151fd4..118a6bf455d9 100644
--- a/drivers/gpio/gpio-intel-mid.c
+++ b/drivers/gpio/gpio-intel-mid.c
@@ -231,23 +231,23 @@ static void intel_mid_irq_mask(struct irq_data *d)
231{ 231{
232} 232}
233 233
234static unsigned int intel_mid_irq_startup(struct irq_data *d) 234static int intel_mid_irq_reqres(struct irq_data *d)
235{ 235{
236 struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d); 236 struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d);
237 237
238 if (gpio_lock_as_irq(&priv->chip, irqd_to_hwirq(d))) 238 if (gpio_lock_as_irq(&priv->chip, irqd_to_hwirq(d))) {
239 dev_err(priv->chip.dev, 239 dev_err(priv->chip.dev,
240 "unable to lock HW IRQ %lu for IRQ\n", 240 "unable to lock HW IRQ %lu for IRQ\n",
241 irqd_to_hwirq(d)); 241 irqd_to_hwirq(d));
242 intel_mid_irq_unmask(d); 242 return -EINVAL;
243 }
243 return 0; 244 return 0;
244} 245}
245 246
246static void intel_mid_irq_shutdown(struct irq_data *d) 247static void intel_mid_irq_relres(struct irq_data *d)
247{ 248{
248 struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d); 249 struct intel_mid_gpio *priv = irq_data_get_irq_chip_data(d);
249 250
250 intel_mid_irq_mask(d);
251 gpio_unlock_as_irq(&priv->chip, irqd_to_hwirq(d)); 251 gpio_unlock_as_irq(&priv->chip, irqd_to_hwirq(d));
252} 252}
253 253
@@ -256,8 +256,8 @@ static struct irq_chip intel_mid_irqchip = {
256 .irq_mask = intel_mid_irq_mask, 256 .irq_mask = intel_mid_irq_mask,
257 .irq_unmask = intel_mid_irq_unmask, 257 .irq_unmask = intel_mid_irq_unmask,
258 .irq_set_type = intel_mid_irq_type, 258 .irq_set_type = intel_mid_irq_type,
259 .irq_startup = intel_mid_irq_startup, 259 .irq_request_resources = intel_mid_irq_reqres,
260 .irq_shutdown = intel_mid_irq_shutdown, 260 .irq_release_resources = intel_mid_irq_relres,
261}; 261};
262 262
263static const struct intel_mid_gpio_ddata gpio_lincroft = { 263static const struct intel_mid_gpio_ddata gpio_lincroft = {