소스 검색

ACPI: use _STA bit names rather than 0x0F

Be explicit about what "device->status = 0x0F" really means.

syntax only.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Bjorn Helgaas 18 년 전
부모
커밋
0c0e892101
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      drivers/acpi/bus.c
  2. 3 1
      drivers/acpi/scan.c

+ 3 - 1
drivers/acpi/bus.c

@@ -103,7 +103,9 @@ int acpi_bus_get_status(struct acpi_device *device)
 	else if (device->parent)
 	else if (device->parent)
 		device->status = device->parent->status;
 		device->status = device->parent->status;
 	else
 	else
-		STRUCT_TO_INT(device->status) = 0x0F;
+		STRUCT_TO_INT(device->status) =
+		    ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
+		    ACPI_STA_DEVICE_UI      | ACPI_STA_DEVICE_FUNCTIONING;
 
 
 	if (device->status.functional && !device->status.present) {
 	if (device->status.functional && !device->status.present) {
 		printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: "
 		printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: "

+ 3 - 1
drivers/acpi/scan.c

@@ -1068,7 +1068,9 @@ acpi_add_single_object(struct acpi_device **child,
 		}
 		}
 		break;
 		break;
 	default:
 	default:
-		STRUCT_TO_INT(device->status) = 0x0F;
+		STRUCT_TO_INT(device->status) =
+		    ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
+		    ACPI_STA_DEVICE_UI      | ACPI_STA_DEVICE_FUNCTIONING;
 		break;
 		break;
 	}
 	}