Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 408919
Collapse All | Expand All

(-)a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c (-12 / +19 lines)
Lines 1265-1290 static struct pci_driver brcms_pci_drive Link Here
1265
/**
1265
/**
1266
 * This is the main entry point for the WL driver.
1266
 * This is the main entry point for the WL driver.
1267
 *
1267
 *
1268
 * This function determines if a device pointed to by pdev is a WL device,
1268
 * This function is scheduled upon module initialization and
1269
 * and if so, performs a brcms_attach() on it.
1269
 * does the driver registration, which result in brcms_bcma_probe()
1270
 *
1270
 * call resulting in the driver bringup.
1271
 */
1271
 */
1272
static int __init brcms_module_init(void)
1272
static void brcms_driver_init(struct work_struct *work)
1273
{
1273
{
1274
	int error = -ENODEV;
1274
    int error;
1275
1276
    error = bcma_driver_register(&brcms_bcma_driver);
1277
	if (error)
1278
		pr_err("%s: register returned %d\n", __func__, error);
1279
}
1280
1281
static DECLARE_WORK(brcms_driver_work, brcms_driver_init);
1275
1282
1283
static int __init brcms_module_init(void)
1284
{
1276
#ifdef BCMDBG
1285
#ifdef BCMDBG
1277
	if (msglevel != 0xdeadbeef)
1286
	if (msglevel != 0xdeadbeef)
1278
		brcm_msg_level = msglevel;
1287
		brcm_msg_level = msglevel;
1279
#endif				/* BCMDBG */
1288
#endif
1280
1281
	error = pci_register_driver(&brcms_pci_driver);
1282
	if (!error)
1283
		return 0;
1284
1285
1289
1290
	if (!schedule_work(&brcms_driver_work))
1291
		return -EBUSY;
1286
1292
1287
	return error;
1293
	return 0;
1288
}
1294
}
1289
1295
1290
/**
1296
/**
Lines 1296-1301 static int __init brcms_module_init(void Link Here
1296
 */
1302
 */
1297
static void __exit brcms_module_exit(void)
1303
static void __exit brcms_module_exit(void)
1298
{
1304
{
1305
	cancel_work_sync(&brcms_driver_work);
1299
	pci_unregister_driver(&brcms_pci_driver);
1306
	pci_unregister_driver(&brcms_pci_driver);
1300
1307
1301
}
1308
}

Return to bug 408919