summaryrefslogtreecommitdiff
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-09-23 18:27:26 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-27 03:18:32 +0400
commit3f9120b0424f3e03c75518cb751f9e2bfa73c32a (patch)
treecee0874824b0b605086055c927671a15ce1bbd68 /include/linux/platform_device.h
parenteee031649707db3c9920d9498f8d03819b74fc23 (diff)
downloadlinux-3f9120b0424f3e03c75518cb751f9e2bfa73c32a.tar.xz
driver core: prevent deferred probe with platform_driver_probe
Prevent drivers relying on platform_driver_probe from requesting deferred probing in order to avoid further futile probe attempts (either the driver has been unregistered or its probe function has been set to platform_drv_probe_fail when probing is retried). Note that several platform drivers currently return subsystem errors from probe and that these can include -EPROBE_DEFER (e.g. if a gpio request fails). Add a warning to platform_drv_probe that can be used to catch drivers that inadvertently request probe deferral while using platform_driver_probe. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index ce8e4ffd78c7..16f6654082dd 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -178,6 +178,7 @@ struct platform_driver {
int (*resume)(struct platform_device *);
struct device_driver driver;
const struct platform_device_id *id_table;
+ bool prevent_deferred_probe;
};
#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \