aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r--drivers/ssb/main.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 8db40c4b86e9..49d7bbb9bea7 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -14,6 +14,7 @@
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/ssb/ssb.h> 15#include <linux/ssb/ssb.h>
16#include <linux/ssb/ssb_regs.h> 16#include <linux/ssb/ssb_regs.h>
17#include <linux/ssb/ssb_driver_gige.h>
17#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
18#include <linux/pci.h> 19#include <linux/pci.h>
19 20
@@ -68,6 +69,25 @@ found:
68} 69}
69#endif /* CONFIG_SSB_PCIHOST */ 70#endif /* CONFIG_SSB_PCIHOST */
70 71
72int ssb_for_each_bus_call(unsigned long data,
73 int (*func)(struct ssb_bus *bus, unsigned long data))
74{
75 struct ssb_bus *bus;
76 int res;
77
78 ssb_buses_lock();
79 list_for_each_entry(bus, &buses, list) {
80 res = func(bus, data);
81 if (res >= 0) {
82 ssb_buses_unlock();
83 return res;
84 }
85 }
86 ssb_buses_unlock();
87
88 return -ENODEV;
89}
90
71static struct ssb_device *ssb_device_get(struct ssb_device *dev) 91static struct ssb_device *ssb_device_get(struct ssb_device *dev)
72{ 92{
73 if (dev) 93 if (dev)
@@ -1171,7 +1191,14 @@ static int __init ssb_modinit(void)
1171 err = b43_pci_ssb_bridge_init(); 1191 err = b43_pci_ssb_bridge_init();
1172 if (err) { 1192 if (err) {
1173 ssb_printk(KERN_ERR "Broadcom 43xx PCI-SSB-bridge " 1193 ssb_printk(KERN_ERR "Broadcom 43xx PCI-SSB-bridge "
1174 "initialization failed"); 1194 "initialization failed\n");
1195 /* don't fail SSB init because of this */
1196 err = 0;
1197 }
1198 err = ssb_gige_init();
1199 if (err) {
1200 ssb_printk(KERN_ERR "SSB Broadcom Gigabit Ethernet "
1201 "driver initialization failed\n");
1175 /* don't fail SSB init because of this */ 1202 /* don't fail SSB init because of this */
1176 err = 0; 1203 err = 0;
1177 } 1204 }
@@ -1185,6 +1212,7 @@ fs_initcall(ssb_modinit);
1185 1212
1186static void __exit ssb_modexit(void) 1213static void __exit ssb_modexit(void)
1187{ 1214{
1215 ssb_gige_exit();
1188 b43_pci_ssb_bridge_exit(); 1216 b43_pci_ssb_bridge_exit();
1189 bus_unregister(&ssb_bustype); 1217 bus_unregister(&ssb_bustype);
1190} 1218}