Driver core fix for 4.5-rc2
Here's a single driver core fix that resolves an issue a lot of users have been hitting for a while now. It's been tested a lot and has been in linux-next successfully for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlauV+8ACgkQMUfUDdst+yk/OQCgzI8I8xgSbGIZBkO+mq+j43SR FVYAoKWvwo55sqbKrDyN/bqLZWxwQYFV =jvr3 -----END PGP SIGNATURE----- Merge tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here's a single driver core fix that resolves an issue a lot of users have been hitting for a while now. It's been tested a lot and has been in linux-next successfully for a while" * tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: base/platform: Fix platform drivers with no probe callback
This commit is contained in:
Коммит
f3ca903fbb
|
@ -558,10 +558,15 @@ static int platform_drv_probe(struct device *_dev)
|
|||
return ret;
|
||||
|
||||
ret = dev_pm_domain_attach(_dev, true);
|
||||
if (ret != -EPROBE_DEFER && drv->probe) {
|
||||
ret = drv->probe(dev);
|
||||
if (ret)
|
||||
dev_pm_domain_detach(_dev, true);
|
||||
if (ret != -EPROBE_DEFER) {
|
||||
if (drv->probe) {
|
||||
ret = drv->probe(dev);
|
||||
if (ret)
|
||||
dev_pm_domain_detach(_dev, true);
|
||||
} else {
|
||||
/* don't fail if just dev_pm_domain_attach failed */
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче