Skip to contentSkip to conversation

platform/x86: dell-privacy: Remove usage of wmi_has_guid()

PATCH In review Armin Wolf 3 participants 3 messages Feb 23, 2024 – Feb 26, 2024

Subsystems (2)
lore
Share & tools
lore

Armin Wolf

author
#0 lore raw

PATCH 1/1 platform/x86: dell-privacy: Remove usage of wmi_has_guid()

The WMI driver core already takes care that the WMI driver is only bound to WMI devices with a matching GUID.

Remove the unnecessary call to wmi_has_guid(), which will always be true when the driver probes.

Tested on a Dell Inspiron 3505.

---
 drivers/platform/x86/dell/dell-wmi-privacy.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/platform/x86/dell/dell-wmi-privacy.c +0 -4
index 4d94603f7785..4b65e1655d42 100644
@@ -297,10 +297,6 @@ static int dell_privacy_wmi_probe(struct wmi_device *wdev, const void *context)
 	struct key_entry *keymap;
 	int ret, i, j;
 
-	ret = wmi_has_guid(DELL_PRIVACY_GUID);
-	if (!ret)
-		pr_debug("Unable to detect available Dell privacy devices!\n");
-
 	priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;

--
2.39.2

Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 9 lines · Armin Wolf

The WMI driver core already takes care that the WMI driver is only bound to WMI devices with a matching GUID.

Remove the unnecessary call to wmi_has_guid(), which will always be true when the driver probes.

Tested on a Dell Inspiron 3505.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 22 lines
---
 drivers/platform/x86/dell/dell-wmi-privacy.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/platform/x86/dell/dell-wmi-privacy.c +0 -5
index 4d94603f7785..4b65e1655d42 100644
@@ -297,10 +297,6 @@ static int dell_privacy_wmi_probe(struct wmi_device *wdev, const void *context)
 	struct key_entry *keymap;
 	int ret, i, j;
 
-	ret = wmi_has_guid(DELL_PRIVACY_GUID);
-	if (!ret)
-		pr_debug("Unable to detect available Dell privacy devices!\n");
-
 	priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
--

2.39.2

maintainer
#2 lore raw
In reply to Armin Wolf
Quoted 9 lines · Armin Wolf

The WMI driver core already takes care that the WMI driver is only bound to WMI devices with a matching GUID.

Remove the unnecessary call to wmi_has_guid(), which will always be true when the driver probes.

Tested on a Dell Inspiron 3505.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: dell-privacy: Remove usage of wmi_has_guid()

      commit: 39849d8fa03c501305dd6fb814fbfbc768fcf96f

--
i.