void driver_detach(const struct device_driver *drv);
void driver_deferred_probe_del(struct device *dev);
void device_set_deferred_probe_reason(const struct device *dev, struct va_format *vaf);
-static inline int driver_match_device(const struct device_driver *drv,
- struct device *dev)
+static inline int driver_match_device_locked(const struct device_driver *drv,
+ struct device *dev)
{
device_lock_assert(dev);
return drv->bus->match ? drv->bus->match(dev, drv) : 1;
}
-static inline int driver_match_device_locked(const struct device_driver *drv,
- struct device *dev)
+static inline int driver_match_device(const struct device_driver *drv,
+ struct device *dev)
{
guard(device)(dev);
- return driver_match_device(drv, dev);
+ return driver_match_device_locked(drv, dev);
}
static inline void dev_sync_state(struct device *dev)
int err = -ENODEV;
dev = bus_find_device_by_name(bus, NULL, buf);
- if (dev && driver_match_device_locked(drv, dev)) {
+ if (dev && driver_match_device(drv, dev)) {
err = device_driver_attach(drv, dev);
if (!err) {
/* success */
bool async_allowed;
int ret;
- ret = driver_match_device(drv, dev);
+ ret = driver_match_device_locked(drv, dev);
if (ret == 0) {
/* no match */
return 0;
* is an error.
*/
- ret = driver_match_device_locked(drv, dev);
+ ret = driver_match_device(drv, dev);
if (ret == 0) {
/* no match */
return 0;