Skip to content

Commit c714fcd

Browse files
author
Bartosz Golaszewski
committed
Merge tag 'intel-gpio-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-current
intel-gpio for v6.9-2 * Make data pointer dereference robust in Intel Tangier driver The following is an automated git shortlog grouped by driver: tangier: - Use correct type for the IRQ chip data
2 parents d806f47 + 7d04502 commit c714fcd

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)