Skip to content

Commit 868adf8

Browse files
gwendalcrij-intel
authored andcommitted
platform/x86: intel-vbtn: Use acpi_has_method to check for switch
The check for a device having virtual buttons is done using acpi_has_method(..."VBDL"). Mimic that for checking virtual switch presence. Signed-off-by: Gwendal Grignou <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 0dd50b3 commit 868adf8

File tree

1 file changed

+1
-5
lines changed
  • drivers/platform/x86/intel

1 file changed

+1
-5
lines changed

drivers/platform/x86/intel/vbtn.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,18 +258,14 @@ static const struct dmi_system_id dmi_switches_allow_list[] = {
258258

259259
static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel)
260260
{
261-
unsigned long long vgbs;
262-
acpi_status status;
263-
264261
/* See dual_accel_detect.h for more info */
265262
if (dual_accel)
266263
return false;
267264

268265
if (!dmi_check_system(dmi_switches_allow_list))
269266
return false;
270267

271-
status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs);
272-
return ACPI_SUCCESS(status);
268+
return acpi_has_method(handle, "VGBS");
273269
}
274270

275271
static int intel_vbtn_probe(struct platform_device *device)

0 commit comments

Comments
 (0)