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 <gwendal@chromium.org> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240329143206.2977734-2-gwendal@chromium.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 0dd50b3 commit 868adf8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • drivers/platform/x86/intel

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)