diff options
author | Viresh Kumar | 2014-11-13 13:44:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-11-14 22:16:05 +0100 |
commit | 669f5faf84998227b2604d310a7f33ac90189b8c (patch) | |
tree | 4216f3638e8a055d6f122344bebee1828bbd9793 /drivers/staging/greybus | |
parent | greybus: Fix missing gb_protocol_exit() on gb_exit() (diff) | |
download | kernel-qcow2-linux-669f5faf84998227b2604d310a7f33ac90189b8c.tar.gz kernel-qcow2-linux-669f5faf84998227b2604d310a7f33ac90189b8c.tar.xz kernel-qcow2-linux-669f5faf84998227b2604d310a7f33ac90189b8c.zip |
greybus: don't set ->dev.driver to NULL when it is already NULL
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>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r-- | drivers/staging/greybus/connection.c | 1 | ||||
-rw-r--r-- | drivers/staging/greybus/interface.c | 1 | ||||
-rw-r--r-- | drivers/staging/greybus/module.c | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index bb26157615a4..5373f44b08c1 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -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; diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index eb63f638fc2c..f7f9bfda4f9b 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -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; diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c index 9cf98cd8d53d..f5d7dc84c1d1 100644 --- a/drivers/staging/greybus/module.c +++ b/drivers/staging/greybus/module.c @@ -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; |