1 --- a/drivers/bcma/driver_gpio.c
2 +++ b/drivers/bcma/driver_gpio.c
3 @@ -73,6 +73,16 @@ static void bcma_gpio_free(struct gpio_c
4 bcma_chipco_gpio_pullup(cc, 1 << gpio, 0);
7 +static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
9 + struct bcma_drv_cc *cc = bcma_gpio_get_cc(chip);
11 + if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
12 + return bcma_core_irq(cc->core);
17 int bcma_gpio_init(struct bcma_drv_cc *cc)
19 struct gpio_chip *chip = &cc->gpio;
20 @@ -85,6 +95,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
21 chip->set = bcma_gpio_set_value;
22 chip->direction_input = bcma_gpio_direction_input;
23 chip->direction_output = bcma_gpio_direction_output;
24 + chip->to_irq = bcma_gpio_to_irq;
26 /* There is just one SoC in one device and its GPIO addresses should be
27 * deterministic to address them more easily. The other buses could get
28 --- a/include/linux/bcma/bcma_driver_mips.h
29 +++ b/include/linux/bcma/bcma_driver_mips.h
30 @@ -42,13 +42,18 @@ struct bcma_drv_mips {
31 #ifdef CONFIG_BCMA_DRIVER_MIPS
32 extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
33 extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
35 +extern unsigned int bcma_core_irq(struct bcma_device *core);
37 static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
38 static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
40 +static inline unsigned int bcma_core_irq(struct bcma_device *core)
46 extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
48 -extern unsigned int bcma_core_irq(struct bcma_device *core);
50 #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */