Message ID | 20240329143206.2977734-2-gwendal@chromium.org (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Ilpo Järvinen |
Headers | show |
Series | platform/x86: intel-vbtn: Fix ASUS VivoBook boot state | expand |
On 3/29/24 7:32 AM, Gwendal Grignou wrote: > To mimic how we check if the device has virtual buttons, > acpi_has_method(..."VBDL"), use the same method for checking virtual > switch presence. if possible don't use words like we/I in the commit log. Other wise, it looks fine. Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> > --- > drivers/platform/x86/intel/vbtn.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/platform/x86/intel/vbtn.c b/drivers/platform/x86/intel/vbtn.c > index 084c355c86f5f..48f0ac19d6ddf 100644 > --- a/drivers/platform/x86/intel/vbtn.c > +++ b/drivers/platform/x86/intel/vbtn.c > @@ -258,9 +258,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { > > static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel) > { > - unsigned long long vgbs; > - acpi_status status; > - > /* See dual_accel_detect.h for more info */ > if (dual_accel) > return false; > @@ -268,8 +265,7 @@ static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel) > if (!dmi_check_system(dmi_switches_allow_list)) > return false; > > - status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs); > - return ACPI_SUCCESS(status); > + return acpi_has_method(handle, "VGBS"); > } > > static int intel_vbtn_probe(struct platform_device *device)
On Fri, 29 Mar 2024, Kuppuswamy Sathyanarayanan wrote: > On 3/29/24 7:32 AM, Gwendal Grignou wrote: > > To mimic how we check if the device has virtual buttons, > > acpi_has_method(..."VBDL"), use the same method for checking virtual > > switch presence. > > if possible don't use words like we/I in the commit log. > > Other wise, it looks fine. > > Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> > > > > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Thanks all. I've applied these into review-ilpo branch. I edited the commit message to get rid of "we" while applying.
diff --git a/drivers/platform/x86/intel/vbtn.c b/drivers/platform/x86/intel/vbtn.c index 084c355c86f5f..48f0ac19d6ddf 100644 --- a/drivers/platform/x86/intel/vbtn.c +++ b/drivers/platform/x86/intel/vbtn.c @@ -258,9 +258,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel) { - unsigned long long vgbs; - acpi_status status; - /* See dual_accel_detect.h for more info */ if (dual_accel) return false; @@ -268,8 +265,7 @@ static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel) if (!dmi_check_system(dmi_switches_allow_list)) return false; - status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs); - return ACPI_SUCCESS(status); + return acpi_has_method(handle, "VGBS"); } static int intel_vbtn_probe(struct platform_device *device)
To mimic how we check if the device has virtual buttons, acpi_has_method(..."VBDL"), use the same method for checking virtual switch presence. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> --- drivers/platform/x86/intel/vbtn.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)