Skip to content

Commit 0e9f8d0

Browse files
johnstultz-workgregkh
authored andcommitted
driver core: Remove driver_deferred_probe_check_state_continue()
Now that driver_deferred_probe_check_state() works better, and we've converted the only user of driver_deferred_probe_check_state_continue() we can simply remove it and simplify some of the logic. Cc: [email protected] Cc: Greg Kroah-Hartman <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Mark Brown <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Saravana Kannan <[email protected]> Cc: Todd Kjos <[email protected]> Cc: Len Brown <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Rob Herring <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Signed-off-by: John Stultz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bec6c0e commit 0e9f8d0

File tree

2 files changed

+8
-46
lines changed

2 files changed

+8
-46
lines changed

drivers/base/dd.c

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -244,19 +244,6 @@ static int __init deferred_probe_timeout_setup(char *str)
244244
}
245245
__setup("deferred_probe_timeout=", deferred_probe_timeout_setup);
246246

247-
static int __driver_deferred_probe_check_state(struct device *dev)
248-
{
249-
if (!IS_ENABLED(CONFIG_MODULES) && initcalls_done)
250-
return -ENODEV;
251-
252-
if (!deferred_probe_timeout) {
253-
dev_WARN(dev, "deferred probe timeout, ignoring dependency");
254-
return -ETIMEDOUT;
255-
}
256-
257-
return -EPROBE_DEFER;
258-
}
259-
260247
/**
261248
* driver_deferred_probe_check_state() - Check deferred probe state
262249
* @dev: device to check
@@ -272,39 +259,15 @@ static int __driver_deferred_probe_check_state(struct device *dev)
272259
*/
273260
int driver_deferred_probe_check_state(struct device *dev)
274261
{
275-
int ret;
276-
277-
ret = __driver_deferred_probe_check_state(dev);
278-
if (ret != -ENODEV)
279-
return ret;
280-
281-
dev_warn(dev, "ignoring dependency for device, assuming no driver");
282-
283-
return -ENODEV;
284-
}
285-
286-
/**
287-
* driver_deferred_probe_check_state_continue() - check deferred probe state
288-
* @dev: device to check
289-
*
290-
* Returns -ETIMEDOUT if deferred probe debug timeout has expired, or
291-
* -EPROBE_DEFER otherwise.
292-
*
293-
* Drivers or subsystems can opt-in to calling this function instead of
294-
* directly returning -EPROBE_DEFER.
295-
*
296-
* This is similar to driver_deferred_probe_check_state(), but it allows the
297-
* subsystem to keep deferring probe after built-in drivers have had a chance
298-
* to probe. One scenario where that is useful is if built-in drivers rely on
299-
* resources that are provided by modular drivers.
300-
*/
301-
int driver_deferred_probe_check_state_continue(struct device *dev)
302-
{
303-
int ret;
262+
if (!IS_ENABLED(CONFIG_MODULES) && initcalls_done) {
263+
dev_warn(dev, "ignoring dependency for device, assuming no driver");
264+
return -ENODEV;
265+
}
304266

305-
ret = __driver_deferred_probe_check_state(dev);
306-
if (ret != -ENODEV)
307-
return ret;
267+
if (!deferred_probe_timeout) {
268+
dev_WARN(dev, "deferred probe timeout, ignoring dependency");
269+
return -ETIMEDOUT;
270+
}
308271

309272
return -EPROBE_DEFER;
310273
}

include/linux/device/driver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ driver_find_device_by_acpi_dev(struct device_driver *drv, const void *adev)
238238

239239
void driver_deferred_probe_add(struct device *dev);
240240
int driver_deferred_probe_check_state(struct device *dev);
241-
int driver_deferred_probe_check_state_continue(struct device *dev);
242241
void driver_init(void);
243242

244243
/**

0 commit comments

Comments
 (0)