diff mbox

platform/x86: intel-hid: Reset wakeup capable flag on removal

Message ID 1822930.HR9WZpLtd6@aspire.rjw.lan (mailing list archive)
State Accepted, archived
Delegated to: Andy Shevchenko
Headers show

Commit Message

Rafael J. Wysocki Feb. 28, 2018, 11:10 a.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The intel-hid device will not be able to wake up the system any more
after removing the notify handler provided by its driver, so make
its sysfs attributes reflect that.

Fixes: ef884112e55c (platform: x86: intel-hid: Wake up the system from suspend-to-idle)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

Resend with the correct platform-driver-x86 list address.

---
 drivers/platform/x86/intel-hid.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko Feb. 28, 2018, 12:30 p.m. UTC | #1
On Wed, 2018-02-28 at 12:10 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> The intel-hid device will not be able to wake up the system any more
> after removing the notify handler provided by its driver, so make
> its sysfs attributes reflect that.
> 

Both patches are applied to my review and testing queue, thanks!
Will be promoted to fixes soon after testing is done.

> Fixes: ef884112e55c (platform: x86: intel-hid: Wake up the system from
> suspend-to-idle)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> Resend with the correct platform-driver-x86 list address.
> 
> ---
>  drivers/platform/x86/intel-hid.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: linux-pm/drivers/platform/x86/intel-hid.c
> ===================================================================
> --- linux-pm.orig/drivers/platform/x86/intel-hid.c
> +++ linux-pm/drivers/platform/x86/intel-hid.c
> @@ -376,6 +376,7 @@ static int intel_hid_remove(struct platf
>  {
>  	acpi_handle handle = ACPI_HANDLE(&device->dev);
>  
> +	device_init_wakeup(&device->dev, false);
>  	acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY,
> notify_handler);
>  	intel_hid_set_enable(&device->dev, false);
>  	intel_button_array_enable(&device->dev, false);
> 
>
Rafael J. Wysocki Feb. 28, 2018, 12:37 p.m. UTC | #2
On Wed, Feb 28, 2018 at 1:30 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Wed, 2018-02-28 at 12:10 +0100, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> The intel-hid device will not be able to wake up the system any more
>> after removing the notify handler provided by its driver, so make
>> its sysfs attributes reflect that.
>>
>
> Both patches are applied to my review and testing queue, thanks!
> Will be promoted to fixes soon after testing is done.

Thanks!
diff mbox

Patch

Index: linux-pm/drivers/platform/x86/intel-hid.c
===================================================================
--- linux-pm.orig/drivers/platform/x86/intel-hid.c
+++ linux-pm/drivers/platform/x86/intel-hid.c
@@ -376,6 +376,7 @@  static int intel_hid_remove(struct platf
 {
 	acpi_handle handle = ACPI_HANDLE(&device->dev);
 
+	device_init_wakeup(&device->dev, false);
 	acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY, notify_handler);
 	intel_hid_set_enable(&device->dev, false);
 	intel_button_array_enable(&device->dev, false);