X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Feisa%2Feisa-bus.c;h=6078e2f588172e73aad9ad45ec2a3cfb9eb7e97d;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=6381ba53853c25c32567be5c37934ad8582a6604;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 6381ba538..6078e2f58 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -135,13 +135,8 @@ struct bus_type eisa_bus_type = { int eisa_driver_register (struct eisa_driver *edrv) { - int r; - edrv->driver.bus = &eisa_bus_type; - if ((r = driver_register (&edrv->driver)) < 0) - return r; - - return 0; + return driver_register (&edrv->driver); } void eisa_driver_unregister (struct eisa_driver *edrv) @@ -149,7 +144,7 @@ void eisa_driver_unregister (struct eisa_driver *edrv) driver_unregister (&edrv->driver); } -static ssize_t eisa_show_sig (struct device *dev, char *buf) +static ssize_t eisa_show_sig (struct device *dev, struct device_attribute *attr, char *buf) { struct eisa_device *edev = to_eisa_device (dev); return sprintf (buf,"%s\n", edev->id.sig); @@ -157,7 +152,7 @@ static ssize_t eisa_show_sig (struct device *dev, char *buf) static DEVICE_ATTR(signature, S_IRUGO, eisa_show_sig, NULL); -static ssize_t eisa_show_state (struct device *dev, char *buf) +static ssize_t eisa_show_state (struct device *dev, struct device_attribute *attr, char *buf) { struct eisa_device *edev = to_eisa_device (dev); return sprintf (buf,"%d\n", edev->state & EISA_CONFIG_ENABLED); @@ -281,13 +276,11 @@ static int __init eisa_probe (struct eisa_root_device *root) /* First try to get hold of slot 0. If there is no device * here, simply fail, unless root->force_probe is set. */ - if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) { + if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) { printk (KERN_ERR "EISA: Couldn't allocate mainboard slot\n"); return -ENOMEM; } - memset (edev, 0, sizeof (*edev)); - if (eisa_request_resources (root, edev, 0)) { printk (KERN_WARNING \ "EISA: Cannot allocate resource for mainboard\n"); @@ -317,13 +310,11 @@ static int __init eisa_probe (struct eisa_root_device *root) force_probe: for (c = 0, i = 1; i <= root->slots; i++) { - if (!(edev = kmalloc (sizeof (*edev), GFP_KERNEL))) { + if (!(edev = kzalloc (sizeof (*edev), GFP_KERNEL))) { printk (KERN_ERR "EISA: Out of memory for slot %d\n", i); continue; } - - memset (edev, 0, sizeof (*edev)); if (eisa_request_resources (root, edev, i)) { printk (KERN_WARNING \