Skip to content

Commit 7d04502

Browse files
committed
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: ccf6fd6 ("gpio: merrifield: Introduce GPIO driver to support Merrifield") Signed-off-by: Andy Shevchenko <[email protected]>
1 parent ace0ebe commit 7d04502

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/gpio/gpio-tangier.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ static int tng_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
195195

196196
static void tng_irq_ack(struct irq_data *d)
197197
{
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);
199200
irq_hw_number_t gpio = irqd_to_hwirq(d);
200201
void __iomem *gisr;
201202
u8 shift;
@@ -227,7 +228,8 @@ static void tng_irq_unmask_mask(struct tng_gpio *priv, u32 gpio, bool unmask)
227228

228229
static void tng_irq_mask(struct irq_data *d)
229230
{
230-
struct tng_gpio *priv = irq_data_get_irq_chip_data(d);
231+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
232+
struct tng_gpio *priv = gpiochip_get_data(gc);
231233
irq_hw_number_t gpio = irqd_to_hwirq(d);
232234

233235
tng_irq_unmask_mask(priv, gpio, false);
@@ -236,7 +238,8 @@ static void tng_irq_mask(struct irq_data *d)
236238

237239
static void tng_irq_unmask(struct irq_data *d)
238240
{
239-
struct tng_gpio *priv = irq_data_get_irq_chip_data(d);
241+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
242+
struct tng_gpio *priv = gpiochip_get_data(gc);
240243
irq_hw_number_t gpio = irqd_to_hwirq(d);
241244

242245
gpiochip_enable_irq(&priv->chip, gpio);

0 commit comments

Comments
 (0)