};
/* 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)
{
"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)
if (dev)
stop_atmel_card(dev, 0);
- ((local_info_t*)link->priv)->eth_dev = 0;
+ ((local_info_t*)link->priv)->eth_dev = NULL;
/* Don't bother checking to see if these succeed or not */
pcmcia_release_configuration(link->handle);