diff options
author | Christoph Hellwig <hch@lst.de> | 2023-05-31 14:55:12 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-05 10:55:20 -0600 |
commit | aa5f6ed8c21ec1aa5fd688118d8d5cd87c5ffc1d (patch) | |
tree | 5698e9d69ce818c563c6589b46f2367e644bf2ac /drivers/base | |
parent | dd2e31afba9e3a3107aa202726b6199c55075f59 (diff) |
driver core: return bool from driver_probe_done
bool is the most sensible return value for a yes/no return. Also
add __init as this funtion is only called from the early boot code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230531125535.676098-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 9c09ca5c4ab6..878aa7646b37 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -751,14 +751,12 @@ static int really_probe_debug(struct device *dev, struct device_driver *drv) * * Should somehow figure out how to use a semaphore, not an atomic variable... */ -int driver_probe_done(void) +bool __init driver_probe_done(void) { int local_probe_count = atomic_read(&probe_count); pr_debug("%s: probe_count = %d\n", __func__, local_probe_count); - if (local_probe_count) - return -EBUSY; - return 0; + return !local_probe_count; } /** |