aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-02-08 18:02:14 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-08 18:02:14 -0500
commitfd5023111cf720db890ef34f305ac5d427e690a0 (patch)
tree4d21e9a02bfbdafe5fc598af0755db791238dbe7 /drivers/bcma
parent8b9a4d56866e0dca6ae886ed9bff777e50d0b70c (diff)
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Synchronize with 'net' in order to sort out some l2tp, wireless, and ipv6 GRE fixes that will be built on top of in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/bcma_private.h5
-rw-r--r--drivers/bcma/driver_gpio.c5
-rw-r--r--drivers/bcma/main.c7
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 6f377bd1a6d6..79595a001204 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -97,11 +97,16 @@ void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
97#ifdef CONFIG_BCMA_DRIVER_GPIO 97#ifdef CONFIG_BCMA_DRIVER_GPIO
98/* driver_gpio.c */ 98/* driver_gpio.c */
99int bcma_gpio_init(struct bcma_drv_cc *cc); 99int bcma_gpio_init(struct bcma_drv_cc *cc);
100int bcma_gpio_unregister(struct bcma_drv_cc *cc);
100#else 101#else
101static inline int bcma_gpio_init(struct bcma_drv_cc *cc) 102static inline int bcma_gpio_init(struct bcma_drv_cc *cc)
102{ 103{
103 return -ENOTSUPP; 104 return -ENOTSUPP;
104} 105}
106static inline int bcma_gpio_unregister(struct bcma_drv_cc *cc)
107{
108 return 0;
109}
105#endif /* CONFIG_BCMA_DRIVER_GPIO */ 110#endif /* CONFIG_BCMA_DRIVER_GPIO */
106 111
107#endif 112#endif
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 0b5df538dfd9..45f0996a3752 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -107,3 +107,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
107 107
108 return gpiochip_add(chip); 108 return gpiochip_add(chip);
109} 109}
110
111int bcma_gpio_unregister(struct bcma_drv_cc *cc)
112{
113 return gpiochip_remove(&cc->gpio);
114}
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 6eda7ef0682f..9a6188add590 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -276,6 +276,13 @@ int bcma_bus_register(struct bcma_bus *bus)
276void bcma_bus_unregister(struct bcma_bus *bus) 276void bcma_bus_unregister(struct bcma_bus *bus)
277{ 277{
278 struct bcma_device *cores[3]; 278 struct bcma_device *cores[3];
279 int err;
280
281 err = bcma_gpio_unregister(&bus->drv_cc);
282 if (err == -EBUSY)
283 bcma_err(bus, "Some GPIOs are still in use.\n");
284 else if (err)
285 bcma_err(bus, "Can not unregister GPIO driver: %i\n", err);
279 286
280 cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K); 287 cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
281 cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE); 288 cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE);