lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1734409029-10419-4-git-send-email-ernis@linux.microsoft.com>
Date: Mon, 16 Dec 2024 20:17:09 -0800
From: Erni Sri Satya Vennela <ernis@...ux.microsoft.com>
To: kys@...rosoft.com,
	haiyangz@...rosoft.com,
	wei.liu@...nel.org,
	decui@...rosoft.com,
	jikos@...nel.org,
	bentiss@...nel.org,
	dmitry.torokhov@...il.com,
	linux-hyperv@...r.kernel.org,
	linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Erni Sri Satya Vennela <ernis@...ux.microsoft.com>
Subject: [PATCH v4 3/3] HID: hyperv: disable as wakeup source

Do not enable mouse as wakeup device since
Suspend-to-Idle feature is no longer supported.

Calling device_init_wakeup in the remove function
is unnecessary since the device is going away, and
thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code
already handles the necessary cleanup.

Signed-off-by: Erni Sri Satya Vennela <ernis@...ux.microsoft.com>
---
Changes in v4:
* Replace device_init_wakeup() with device_set_wakeup_capable
  without reverting "HID: hyperv: register as a wakeup source".
* Remove device_init_wakeup() in mousevsc_remove().
ref: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f20b161f59b73d40043199b3bff362e656a9c673

Changes in v3, v2:
* No change
---
 drivers/hid/hid-hyperv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 0fb210e40a41..05215e79eac8 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -515,7 +515,7 @@ static int mousevsc_probe(struct hv_device *device,
 	if (ret)
 		goto probe_err2;
 
-	device_init_wakeup(&device->device, true);
+	device_set_wakeup_capable(&device->device, true);
 
 	input_dev->connected = true;
 	input_dev->init_complete = true;
@@ -539,7 +539,6 @@ static void mousevsc_remove(struct hv_device *dev)
 {
 	struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
 
-	device_init_wakeup(&dev->device, false);
 	vmbus_close(dev->channel);
 	hid_hw_stop(input_dev->hid_device);
 	hid_destroy_device(input_dev->hid_device);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ