bonding: change error message to debug message in __bond_release_one()
[cascardo/linux.git] / drivers / bcma / driver_gpio.c
index aec9f85..598a6cd 100644 (file)
@@ -76,7 +76,7 @@ static void bcma_gpio_free(struct gpio_chip *chip, unsigned gpio)
        bcma_chipco_gpio_pullup(cc, 1 << gpio, 0);
 }
 
-#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
+#if IS_BUILTIN(CONFIG_BCM47XX)
 static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
 {
        struct bcma_drv_cc *cc = bcma_gpio_get_cc(chip);
@@ -152,7 +152,7 @@ static int bcma_gpio_irq_domain_init(struct bcma_drv_cc *cc)
                                         handle_simple_irq);
        }
 
-       hwirq = bcma_core_irq(cc->core);
+       hwirq = bcma_core_irq(cc->core, 0);
        err = request_irq(hwirq, bcma_gpio_irq_handler, IRQF_SHARED, "gpio",
                          cc);
        if (err)
@@ -183,7 +183,7 @@ static void bcma_gpio_irq_domain_exit(struct bcma_drv_cc *cc)
                return;
 
        bcma_cc_mask32(cc, BCMA_CC_IRQMASK, ~BCMA_CC_IRQ_GPIO);
-       free_irq(bcma_core_irq(cc->core), cc);
+       free_irq(bcma_core_irq(cc->core, 0), cc);
        for (gpio = 0; gpio < chip->ngpio; gpio++) {
                int irq = irq_find_mapping(cc->irq_domain, gpio);
 
@@ -215,8 +215,12 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
        chip->set               = bcma_gpio_set_value;
        chip->direction_input   = bcma_gpio_direction_input;
        chip->direction_output  = bcma_gpio_direction_output;
-#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
+#if IS_BUILTIN(CONFIG_BCM47XX)
        chip->to_irq            = bcma_gpio_to_irq;
+#endif
+#if IS_BUILTIN(CONFIG_OF)
+       if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
+               chip->of_node   = cc->core->dev.of_node;
 #endif
        switch (cc->core->bus->chipinfo.id) {
        case BCMA_CHIP_ID_BCM5357:
@@ -251,5 +255,6 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
 int bcma_gpio_unregister(struct bcma_drv_cc *cc)
 {
        bcma_gpio_irq_domain_exit(cc);
-       return gpiochip_remove(&cc->gpio);
+       gpiochip_remove(&cc->gpio);
+       return 0;
 }