diff options
| author | Simon Kelley <simon@thekelleys.org.uk> | 2004-07-02 03:55:11 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2004-07-02 03:55:11 -0400 |
| commit | 15b273f1b4f4fc018a8c699d4e3c90cdc829d924 (patch) | |
| tree | ace6b2f04ee974a09ccb8ff3c06ac93941c54a60 | |
| parent | 9b61ffcf2ddb693d7c5f3f06605139e8a91b27b8 (diff) | |
[PATCH] [Bug 2948] New: Atmel wireless driver Oopses
| -rw-r--r-- | drivers/net/wireless/atmel_cs.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 06b09a0327c2..cccec2b32049 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c @@ -348,9 +348,19 @@ static struct { }; /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ -static struct device atmel_device = { - .bus_id = "pcmcia", -}; +static struct device *atmel_device(void) +{ + static char *kobj_name = "atmel_cs"; + + static struct device dev = { + .bus_id = "pcmcia", + }; + dev.kobj.k_name = kmalloc(strlen(kobj_name)+1, GFP_KERNEL); + strcpy(dev.kobj.k_name, kobj_name); + kobject_init(&dev.kobj); + + return &dev; +} static void atmel_config(dev_link_t *link) { @@ -537,12 +547,12 @@ static void atmel_config(dev_link_t *link) "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config."); goto cs_failed; } - + ((local_info_t*)link->priv)->eth_dev = init_atmel_card(link->irq.AssignedIRQ, link->io.BasePort1, card_index == -1 ? NULL : card_table[card_index].firmware, - &atmel_device, + atmel_device(), card_present, link); if (!((local_info_t*)link->priv)->eth_dev) |
