diff options
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index c6c933f58102..579906f88b09 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -488,12 +488,12 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv, | |||
488 | * if the probe was successful, and make sure any forced probes of | 488 | * if the probe was successful, and make sure any forced probes of |
489 | * new devices fail. | 489 | * new devices fail. |
490 | */ | 490 | */ |
491 | spin_lock(&platform_bus_type.p->klist_drivers.k_lock); | 491 | spin_lock(&drv->driver.bus->p->klist_drivers.k_lock); |
492 | drv->probe = NULL; | 492 | drv->probe = NULL; |
493 | if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list)) | 493 | if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list)) |
494 | retval = -ENODEV; | 494 | retval = -ENODEV; |
495 | drv->driver.probe = platform_drv_probe_fail; | 495 | drv->driver.probe = platform_drv_probe_fail; |
496 | spin_unlock(&platform_bus_type.p->klist_drivers.k_lock); | 496 | spin_unlock(&drv->driver.bus->p->klist_drivers.k_lock); |
497 | 497 | ||
498 | if (code != retval) | 498 | if (code != retval) |
499 | platform_driver_unregister(drv); | 499 | platform_driver_unregister(drv); |