Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: tangier: Use correct type for the IRQ chip data

IRQ chip data contains a pointer to the GPIO chip. Luckily we have
the pointers the same, but strictly speaking it's not guaranteed.
Even though, still better to fix this.

Fixes: ccf6fd6dcc86 ("gpio: merrifield: Introduce GPIO driver to support Merrifield")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

+6 -3
+6 -3
drivers/gpio/gpio-tangier.c
··· 195 195 196 196 static void tng_irq_ack(struct irq_data *d) 197 197 { 198 - struct tng_gpio *priv = irq_data_get_irq_chip_data(d); 198 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 199 + struct tng_gpio *priv = gpiochip_get_data(gc); 199 200 irq_hw_number_t gpio = irqd_to_hwirq(d); 200 201 void __iomem *gisr; 201 202 u8 shift; ··· 228 227 229 228 static void tng_irq_mask(struct irq_data *d) 230 229 { 231 - struct tng_gpio *priv = irq_data_get_irq_chip_data(d); 230 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 231 + struct tng_gpio *priv = gpiochip_get_data(gc); 232 232 irq_hw_number_t gpio = irqd_to_hwirq(d); 233 233 234 234 tng_irq_unmask_mask(priv, gpio, false); ··· 238 236 239 237 static void tng_irq_unmask(struct irq_data *d) 240 238 { 241 - struct tng_gpio *priv = irq_data_get_irq_chip_data(d); 239 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 240 + struct tng_gpio *priv = gpiochip_get_data(gc); 242 241 irq_hw_number_t gpio = irqd_to_hwirq(d); 243 242 244 243 gpiochip_enable_irq(&priv->chip, gpio);