greybus: don't set ->dev.driver to NULL when it is already NULL
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 13 Nov 2014 12:44:34 +0000 (18:14 +0530)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 14 Nov 2014 21:16:05 +0000 (13:16 -0800)
Parent objects of 'dev' are allocated with kzalloc() and so all of their fields
are initialized with 0. Hence no need of marking them NULL again.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/connection.c
drivers/staging/greybus/interface.c
drivers/staging/greybus/module.c

index bb26157615a4a1c223126fa6ac2607909cdbabe8..5373f44b08c1d6ccd74dea21ab388ce8b6ab5720 100644 (file)
@@ -185,7 +185,6 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
        connection->state = GB_CONNECTION_STATE_DISABLED;
 
        connection->dev.parent = &interface->dev;
-       connection->dev.driver = NULL;
        connection->dev.bus = &greybus_bus_type;
        connection->dev.type = &greybus_connection_type;
        connection->dev.groups = connection_groups;
index eb63f638fc2c574af671ddf6759fe27e67319ad2..f7f9bfda4f9b59d2f3d8d1846abf4e0ab34582f7 100644 (file)
@@ -69,7 +69,6 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
        /* Build up the interface device structures and register it with the
         * driver core */
        interface->dev.parent = &gmod->dev;
-       interface->dev.driver = NULL;
        interface->dev.bus = &greybus_bus_type;
        interface->dev.type = &greybus_interface_type;
        interface->dev.groups = interface_groups;
index 9cf98cd8d53d7b5b58ec34d55936305cc29e3d90..f5d7dc84c1d181f856ad5f8c1f1c0037a80eb89c 100644 (file)
@@ -90,7 +90,6 @@ struct gb_module *gb_module_create(struct greybus_host_device *hd, u8 module_id)
        spin_unlock_irq(&gb_modules_lock);
 
        gmod->dev.parent = hd->parent;
-       gmod->dev.driver = NULL;
        gmod->dev.bus = &greybus_bus_type;
        gmod->dev.type = &greybus_module_type;
        gmod->dev.groups = greybus_module_groups;