aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-22 15:55:55 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-22 15:55:55 -0500
commitf4b734c35e98c343cd99824153de09e48867b97e (patch)
tree7f93d1515e3750a6d2fe5bb5f6bcf1249ad4f436 /drivers/acpi
parent443fc8202272190c4693209b772edba46cd7fe61 (diff)
ACPI / hotplug: Drop unfinished global notification handling routines
There are two global hotplug notification handling routines in bus.c, acpi_bus_check_device() and acpi_bus_check_scope(), that have never been finished and don't do anything useful, so drop them. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/bus.c64
1 files changed, 2 insertions, 62 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index bba9b72e25f8..8b09a75f6579 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -329,58 +329,6 @@ static void acpi_bus_osc_support(void)
329 Notification Handling 329 Notification Handling
330 -------------------------------------------------------------------------- */ 330 -------------------------------------------------------------------------- */
331 331
332static void acpi_bus_check_device(acpi_handle handle)
333{
334 struct acpi_device *device;
335 acpi_status status;
336 struct acpi_device_status old_status;
337
338 if (acpi_bus_get_device(handle, &device))
339 return;
340 if (!device)
341 return;
342
343 old_status = device->status;
344
345 /*
346 * Make sure this device's parent is present before we go about
347 * messing with the device.
348 */
349 if (device->parent && !device->parent->status.present) {
350 device->status = device->parent->status;
351 return;
352 }
353
354 status = acpi_bus_get_status(device);
355 if (ACPI_FAILURE(status))
356 return;
357
358 if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status))
359 return;
360
361 /*
362 * Device Insertion/Removal
363 */
364 if ((device->status.present) && !(old_status.present)) {
365 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device insertion detected\n"));
366 /* TBD: Handle device insertion */
367 } else if (!(device->status.present) && (old_status.present)) {
368 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device removal detected\n"));
369 /* TBD: Handle device removal */
370 }
371}
372
373static void acpi_bus_check_scope(acpi_handle handle)
374{
375 /* Status Change? */
376 acpi_bus_check_device(handle);
377
378 /*
379 * TBD: Enumerate child devices within this device's scope and
380 * run acpi_bus_check_device()'s on them.
381 */
382}
383
384/** 332/**
385 * acpi_bus_notify 333 * acpi_bus_notify
386 * --------------- 334 * ---------------
@@ -397,19 +345,11 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
397 switch (type) { 345 switch (type) {
398 346
399 case ACPI_NOTIFY_BUS_CHECK: 347 case ACPI_NOTIFY_BUS_CHECK:
400 acpi_bus_check_scope(handle); 348 /* TBD */
401 /*
402 * TBD: We'll need to outsource certain events to non-ACPI
403 * drivers via the device manager (device.c).
404 */
405 break; 349 break;
406 350
407 case ACPI_NOTIFY_DEVICE_CHECK: 351 case ACPI_NOTIFY_DEVICE_CHECK:
408 acpi_bus_check_device(handle); 352 /* TBD */
409 /*
410 * TBD: We'll need to outsource certain events to non-ACPI
411 * drivers via the device manager (device.c).
412 */
413 break; 353 break;
414 354
415 case ACPI_NOTIFY_DEVICE_WAKE: 355 case ACPI_NOTIFY_DEVICE_WAKE: