Driver core: move the static kobject out of struct driver
This patch removes the kobject, and a few other driver-core-only fields out of struct driver and into the driver core only. Now drivers can be safely create on the stack or statically (like they currently are.) Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@ -499,7 +499,7 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv,
|
||||
*/
|
||||
spin_lock(&platform_bus_type.p->klist_drivers.k_lock);
|
||||
drv->probe = NULL;
|
||||
if (code == 0 && list_empty(&drv->driver.klist_devices.k_list))
|
||||
if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list))
|
||||
retval = -ENODEV;
|
||||
drv->driver.probe = platform_drv_probe_fail;
|
||||
spin_unlock(&platform_bus_type.p->klist_drivers.k_lock);
|
||||
|
Reference in New Issue
Block a user