diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-08-09 05:15:57 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-08-09 06:14:35 -0400 |
commit | 21ba074cb47171a34f60e250e8f7ef3dc1529e43 (patch) | |
tree | 5ae9372e727f33a86156c893021c201c4db855ca /drivers/acpi/x86/utils.c | |
parent | d0ed4c60abfb9a4ab6cd416d1dea9df6266f8fc7 (diff) |
ACPI / x86: utils: Remove status workaround from acpi_device_always_present()
Now that we init the status field to ACPI_STA_DEFAULT rather then to 0,
the workaround for acpi_match_device_ids() always returning -ENOENT when
status is 0 is no longer needed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/x86/utils.c')
-rw-r--r-- | drivers/acpi/x86/utils.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c index 3a13b2af2bf8..06c31ec3cc70 100644 --- a/drivers/acpi/x86/utils.c +++ b/drivers/acpi/x86/utils.c | |||
@@ -109,13 +109,9 @@ static const struct always_present_id always_present_ids[] = { | |||
109 | 109 | ||
110 | bool acpi_device_always_present(struct acpi_device *adev) | 110 | bool acpi_device_always_present(struct acpi_device *adev) |
111 | { | 111 | { |
112 | u32 *status = (u32 *)&adev->status; | ||
113 | u32 old_status = *status; | ||
114 | bool ret = false; | 112 | bool ret = false; |
115 | unsigned int i; | 113 | unsigned int i; |
116 | 114 | ||
117 | /* acpi_match_device_ids checks status, so set it to default */ | ||
118 | *status = ACPI_STA_DEFAULT; | ||
119 | for (i = 0; i < ARRAY_SIZE(always_present_ids); i++) { | 115 | for (i = 0; i < ARRAY_SIZE(always_present_ids); i++) { |
120 | if (acpi_match_device_ids(adev, always_present_ids[i].hid)) | 116 | if (acpi_match_device_ids(adev, always_present_ids[i].hid)) |
121 | continue; | 117 | continue; |
@@ -131,15 +127,9 @@ bool acpi_device_always_present(struct acpi_device *adev) | |||
131 | !dmi_check_system(always_present_ids[i].dmi_ids)) | 127 | !dmi_check_system(always_present_ids[i].dmi_ids)) |
132 | continue; | 128 | continue; |
133 | 129 | ||
134 | if (old_status != ACPI_STA_DEFAULT) /* Log only once */ | ||
135 | dev_info(&adev->dev, | ||
136 | "Device [%s] is in always present list\n", | ||
137 | adev->pnp.bus_id); | ||
138 | |||
139 | ret = true; | 130 | ret = true; |
140 | break; | 131 | break; |
141 | } | 132 | } |
142 | *status = old_status; | ||
143 | 133 | ||
144 | return ret; | 134 | return ret; |
145 | } | 135 | } |