summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'device.c')
-rw-r--r--device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/device.c b/device.c
index 9bad507..d8617fc 100644
--- a/device.c
+++ b/device.c
@@ -1208,3 +1208,14 @@ static void __init simple_device_type_init(void)
{
device_type_add(&simple_device_type);
}
+
+void device_hotplug_event(const char *name, bool add)
+{
+ struct device *dev;
+
+ dev = device_find(name);
+ if (!dev || dev->type != &simple_device_type)
+ return;
+
+ device_set_present(dev, add);
+}