Message ID | 20161208123618.28603-2-kernel@kempniu.pl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 08 December 2016 13:36:12 Michał Kępień wrote: > As dell_micmute_led_set() no longer uses the dell_wmi_perform_query() > method, which was removed in 0c41a08 ("dell-led: use > dell_smbios_send_request() for performing SMBIOS calls"), the > DELL_APP_GUID check is redundant and thus can be safely removed. > > Signed-off-by: Michał Kępień <kernel@kempniu.pl> > --- > drivers/leds/dell-led.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c > index b3d6e9c..e8e8f67 100644 > --- a/drivers/leds/dell-led.c > +++ b/drivers/leds/dell-led.c > @@ -51,9 +51,6 @@ static int dell_micmute_led_set(int state) > struct calling_interface_buffer *buffer; > struct calling_interface_token *token; > > - if (!wmi_has_guid(DELL_APP_GUID)) > - return -ENODEV; > - > if (state == 0) > token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE); > else if (state == 1) Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Anyway, you can remove DELL_APP_GUID from other places too...
> On Thursday 08 December 2016 13:36:12 Michał Kępień wrote: > > As dell_micmute_led_set() no longer uses the dell_wmi_perform_query() > > method, which was removed in 0c41a08 ("dell-led: use > > dell_smbios_send_request() for performing SMBIOS calls"), the > > DELL_APP_GUID check is redundant and thus can be safely removed. > > > > Signed-off-by: Michał Kępień <kernel@kempniu.pl> > > --- > > drivers/leds/dell-led.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c > > index b3d6e9c..e8e8f67 100644 > > --- a/drivers/leds/dell-led.c > > +++ b/drivers/leds/dell-led.c > > @@ -51,9 +51,6 @@ static int dell_micmute_led_set(int state) > > struct calling_interface_buffer *buffer; > > struct calling_interface_token *token; > > > > - if (!wmi_has_guid(DELL_APP_GUID)) > > - return -ENODEV; > > - > > if (state == 0) > > token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE); > > else if (state == 1) > > Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Thanks for reviewing. > Anyway, you can remove DELL_APP_GUID from other places too... I did that in patch 6. I singled out this one occurrence because it is part of the code that is moved to drivers/platform/x86. Please let me know if you would like me to arrange this differently.
diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c index b3d6e9c..e8e8f67 100644 --- a/drivers/leds/dell-led.c +++ b/drivers/leds/dell-led.c @@ -51,9 +51,6 @@ static int dell_micmute_led_set(int state) struct calling_interface_buffer *buffer; struct calling_interface_token *token; - if (!wmi_has_guid(DELL_APP_GUID)) - return -ENODEV; - if (state == 0) token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE); else if (state == 1)
As dell_micmute_led_set() no longer uses the dell_wmi_perform_query() method, which was removed in 0c41a08 ("dell-led: use dell_smbios_send_request() for performing SMBIOS calls"), the DELL_APP_GUID check is redundant and thus can be safely removed. Signed-off-by: Michał Kępień <kernel@kempniu.pl> --- drivers/leds/dell-led.c | 3 --- 1 file changed, 3 deletions(-)