Merge branch 'upstream-fixes'
[cascardo/linux.git] / arch / parisc / kernel / drivers.c
index 1eaa0d3..3d569a4 100644 (file)
@@ -173,8 +173,6 @@ int register_parisc_driver(struct parisc_driver *driver)
        WARN_ON(driver->drv.probe != NULL);
        WARN_ON(driver->drv.remove != NULL);
 
-       driver->drv.probe = parisc_driver_probe;
-       driver->drv.remove = parisc_driver_remove;
        driver->drv.name = driver->name;
 
        return driver_register(&driver->drv);
@@ -410,11 +408,10 @@ static void setup_bus_id(struct parisc_device *padev)
 
 struct parisc_device * create_tree_node(char id, struct device *parent)
 {
-       struct parisc_device *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+       struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
                return NULL;
 
-       memset(dev, 0, sizeof(*dev));
        dev->hw_path = id;
        dev->id.hw_type = HPHW_FAULTY;
 
@@ -575,6 +572,8 @@ struct bus_type parisc_bus_type = {
        .name = "parisc",
        .match = parisc_generic_match,
        .dev_attrs = parisc_device_attrs,
+       .probe = parisc_driver_probe,
+       .remove = parisc_driver_remove,
 };
 
 /**