diff options
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r-- | drivers/acpi/container.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index e23151667655..83d232c10f13 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -44,19 +44,24 @@ static const struct acpi_device_id container_device_ids[] = { | |||
44 | {"", 0}, | 44 | {"", 0}, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static int container_device_attach(struct acpi_device *device, | 47 | static int container_device_attach(struct acpi_device *adev, |
48 | const struct acpi_device_id *not_used) | 48 | const struct acpi_device_id *not_used) |
49 | { | 49 | { |
50 | /* This is necessary for container hotplug to work. */ | 50 | kobject_uevent(&adev->dev.kobj, KOBJ_ONLINE); |
51 | return 1; | 51 | return 1; |
52 | } | 52 | } |
53 | 53 | ||
54 | static void container_device_detach(struct acpi_device *adev) | ||
55 | { | ||
56 | kobject_uevent(&adev->dev.kobj, KOBJ_OFFLINE); | ||
57 | } | ||
58 | |||
54 | static struct acpi_scan_handler container_handler = { | 59 | static struct acpi_scan_handler container_handler = { |
55 | .ids = container_device_ids, | 60 | .ids = container_device_ids, |
56 | .attach = container_device_attach, | 61 | .attach = container_device_attach, |
62 | .detach = container_device_detach, | ||
57 | .hotplug = { | 63 | .hotplug = { |
58 | .enabled = true, | 64 | .enabled = true, |
59 | .mode = AHM_CONTAINER, | ||
60 | }, | 65 | }, |
61 | }; | 66 | }; |
62 | 67 | ||