]> git.baikalelectronics.ru Git - kernel.git/commitdiff
driver core: Delete driver_deferred_probe_check_state()
authorSaravana Kannan <saravanak@google.com>
Wed, 1 Jun 2022 07:07:05 +0000 (00:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 13:57:54 +0000 (15:57 +0200)
The function is no longer used. So delete it.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20220601070707.3946847-10-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/dd.c
include/linux/device/driver.h

index 335e71d3a618d819ab7dab373df63ad6d1fec9ce..e600dd2afc35eb269019067ebb6c89d06754aef0 100644 (file)
@@ -274,42 +274,12 @@ static int __init deferred_probe_timeout_setup(char *str)
 }
 __setup("deferred_probe_timeout=", deferred_probe_timeout_setup);
 
-/**
- * driver_deferred_probe_check_state() - Check deferred probe state
- * @dev: device to check
- *
- * Return:
- * * -ENODEV if initcalls have completed and modules are disabled.
- * * -ETIMEDOUT if the deferred probe timeout was set and has expired
- *   and modules are enabled.
- * * -EPROBE_DEFER in other cases.
- *
- * Drivers or subsystems can opt-in to calling this function instead of directly
- * returning -EPROBE_DEFER.
- */
-int driver_deferred_probe_check_state(struct device *dev)
-{
-       if (!IS_ENABLED(CONFIG_MODULES) && initcalls_done) {
-               dev_warn(dev, "ignoring dependency for device, assuming no driver\n");
-               return -ENODEV;
-       }
-
-       if (!driver_deferred_probe_timeout && initcalls_done) {
-               dev_warn(dev, "deferred probe timeout, ignoring dependency\n");
-               return -ETIMEDOUT;
-       }
-
-       return -EPROBE_DEFER;
-}
-EXPORT_SYMBOL_GPL(driver_deferred_probe_check_state);
-
 static void deferred_probe_timeout_work_func(struct work_struct *work)
 {
        struct device_private *p;
 
        fw_devlink_drivers_done();
 
-       driver_deferred_probe_timeout = 0;
        driver_deferred_probe_trigger();
        flush_work(&deferred_probe_work);
 
index 2114d65b862fc64e5ed3f8ee1395e140782879dc..7acaabde5396d8288c5b29864a9b06d8b25ab5c6 100644 (file)
@@ -242,7 +242,6 @@ driver_find_device_by_acpi_dev(struct device_driver *drv, const void *adev)
 
 extern int driver_deferred_probe_timeout;
 void driver_deferred_probe_add(struct device *dev);
-int driver_deferred_probe_check_state(struct device *dev);
 void driver_init(void);
 
 /**