]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/rpaphp_slot.c
Merge branch 'master' into gfs2
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / rpaphp_slot.c
index 04cc1e7275ce1c57cb78a768ed6808b88cba8124..b771196a654ea47d38ae33668649158844430133 100644 (file)
@@ -84,19 +84,16 @@ struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_
 {
        struct slot *slot;
        
-       slot = kmalloc(sizeof (struct slot), GFP_KERNEL);
+       slot = kzalloc(sizeof(struct slot), GFP_KERNEL);
        if (!slot)
                goto error_nomem;
-       memset(slot, 0, sizeof (struct slot));
-       slot->hotplug_slot = kmalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
+       slot->hotplug_slot = kzalloc(sizeof(struct hotplug_slot), GFP_KERNEL);
        if (!slot->hotplug_slot)
                goto error_slot;        
-       memset(slot->hotplug_slot, 0, sizeof (struct hotplug_slot));
-       slot->hotplug_slot->info = kmalloc(sizeof (struct hotplug_slot_info),
+       slot->hotplug_slot->info = kzalloc(sizeof(struct hotplug_slot_info),
                                           GFP_KERNEL);
        if (!slot->hotplug_slot->info)
                goto error_hpslot;
-       memset(slot->hotplug_slot->info, 0, sizeof (struct hotplug_slot_info));
        slot->hotplug_slot->name = kmalloc(BUS_ID_SIZE + 1, GFP_KERNEL);
        if (!slot->hotplug_slot->name)
                goto error_info;        
@@ -159,6 +156,7 @@ int rpaphp_deregister_slot(struct slot *slot)
        dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
        return retval;
 }
+EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
 
 int rpaphp_register_slot(struct slot *slot)
 {