linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, jikos@kernel.org, bentiss@kernel.org,
	dmitry.torokhov@gmail.com, linux-hyperv@vger.kernel.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Subject: [PATCH v4 3/3] HID: hyperv: disable as wakeup source
Date: Mon, 16 Dec 2024 20:17:09 -0800	[thread overview]
Message-ID: <1734409029-10419-4-git-send-email-ernis@linux.microsoft.com> (raw)
In-Reply-To: <1734409029-10419-1-git-send-email-ernis@linux.microsoft.com>

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@linux.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


      parent reply	other threads:[~2024-12-17  4:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  4:17 [PATCH v4 0/3] Disable Suspend-to-Idle in Hyper-V and Fix Hibernation Interruptions Erni Sri Satya Vennela
2024-12-17  4:17 ` [PATCH v4 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus Erni Sri Satya Vennela
2024-12-17 19:27   ` Wei Liu
2024-12-18  6:27   ` Michael Kelley
2025-01-24 16:54     ` Erni Sri Satya Vennela
2024-12-17  4:17 ` [PATCH v4 2/3] Input: hyperv-keyboard - disable as wakeup source Erni Sri Satya Vennela
2024-12-17  4:17 ` Erni Sri Satya Vennela [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1734409029-10419-4-git-send-email-ernis@linux.microsoft.com \
    --to=ernis@linux.microsoft.com \
    --cc=bentiss@kernel.org \
    --cc=decui@microsoft.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=haiyangz@microsoft.com \
    --cc=jikos@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).