diff options
-rw-r--r-- | drivers/base/core.c | 4 | ||||
-rw-r--r-- | include/linux/wait.h | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index d21eb7744496..fbc223486f81 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -245,6 +245,7 @@ int device_add(struct device *dev) | |||
245 | 245 | ||
246 | if ((error = kobject_add(&dev->kobj))) | 246 | if ((error = kobject_add(&dev->kobj))) |
247 | goto Error; | 247 | goto Error; |
248 | kobject_hotplug(&dev->kobj, KOBJ_ADD); | ||
248 | if ((error = device_pm_add(dev))) | 249 | if ((error = device_pm_add(dev))) |
249 | goto PMError; | 250 | goto PMError; |
250 | if ((error = bus_add_device(dev))) | 251 | if ((error = bus_add_device(dev))) |
@@ -257,14 +258,13 @@ int device_add(struct device *dev) | |||
257 | /* notify platform of device entry */ | 258 | /* notify platform of device entry */ |
258 | if (platform_notify) | 259 | if (platform_notify) |
259 | platform_notify(dev); | 260 | platform_notify(dev); |
260 | |||
261 | kobject_hotplug(&dev->kobj, KOBJ_ADD); | ||
262 | Done: | 261 | Done: |
263 | put_device(dev); | 262 | put_device(dev); |
264 | return error; | 263 | return error; |
265 | BusError: | 264 | BusError: |
266 | device_pm_remove(dev); | 265 | device_pm_remove(dev); |
267 | PMError: | 266 | PMError: |
267 | kobject_hotplug(&dev->kobj, KOBJ_REMOVE); | ||
268 | kobject_del(&dev->kobj); | 268 | kobject_del(&dev->kobj); |
269 | Error: | 269 | Error: |
270 | if (parent) | 270 | if (parent) |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 17c874a8eb3f..c9486c3efb4a 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -386,9 +386,7 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | |||
386 | wait_queue_t name = { \ | 386 | wait_queue_t name = { \ |
387 | .task = current, \ | 387 | .task = current, \ |
388 | .func = autoremove_wake_function, \ | 388 | .func = autoremove_wake_function, \ |
389 | .task_list = { .next = &(name).task_list, \ | 389 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
390 | .prev = &(name).task_list, \ | ||
391 | }, \ | ||
392 | } | 390 | } |
393 | 391 | ||
394 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 392 | #define DEFINE_WAIT_BIT(name, word, bit) \ |