summaryrefslogtreecommitdiffstats
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index c8856304f5..810d0011f6 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -93,6 +93,13 @@ int device_probe(struct device_d *dev)
return 0;
}
+int device_detect(struct device_d *dev)
+{
+ if (!dev->detect)
+ return -ENOSYS;
+ return dev->detect(dev);
+}
+
static int match(struct driver_d *drv, struct device_d *dev)
{
int ret;