mfd: asic3: Add to_irq() member to gpio_chip structure
PATCH 1/1 mfd: asic3: Add to_irq() member to gpio_chip structure
The gpio_to_irq() macro is now defined as __gpio_to_irq() instead of IRQ_GPIO(). The __gpio_to_irq() function returns -ENXIO if the referenced gpio_chip structure does not define a to_irq() member.
This is true of the asic3 gpio_chip structure, and thus calls to gpio_to_irq() now fail (for example from the gpio-vbus module).
This patch defines the to_irq() member in the asic3 gpio_chip structure.
---
drivers/mfd/asic3.c +6 -0
@@ -525,6 +525,11 @@return ; } +static int asic3_gpio_to_irq (struct gpio_chip *chip,unsigned offset) +{ +return (offset <ASIC3_NUM_GPIOS ) ?IRQ_BOARD_START + offset : -ENXIO ; +} +static __init int asic3_gpio_probe (struct platform_device *pdev,u16 *gpio_config,int num) {
@@ -976,6 +981,7 @@ asic->gpio.set = asic3_gpio_set; asic->gpio.direction_input = asic3_gpio_direction_input; asic->gpio.direction_output = asic3_gpio_direction_output; + asic->gpio.to_irq = asic3_gpio_to_irq; ret = asic3_gpio_probe(pdev, pdata->gpio_config,
Hi Paul,
Quoted 6 lines · Paul Parsons
The
gpio_to_irq()macro is now defined as__gpio_to_irq()instead ofIRQ_GPIO(). The__gpio_to_irq()function returns-ENXIOif the referencedgpio_chipstructure does not define ato_irq()member.
This is true of the asic3gpio_chipstructure, and thus calls togpio_to_irq()now fail (for example from the gpio-vbus module).
This patch defines theto_irq()member in the asic3gpio_chipstructure.
Good old asic3...Thanks, I applied this one.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/