HID: remove NO_D3 flag when remove driver
authorSong Hongyan <hongyan.song@intel.com>
Sun, 2 Jun 2019 00:17:21 +0000 (08:17 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 26 Jun 2019 21:33:34 +0000 (23:33 +0200)
Remove the NO_D3 flag when remove the driver and let device enter
into D3, it will save more power.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ipc/pci-ish.c

index 17ae49fba920f6d8eea99daedad7b7b5f3008467..aa80b4d3b740411ab8159f0c82d683d7c3d24d1c 100644 (file)
@@ -184,6 +184,7 @@ static void ish_remove(struct pci_dev *pdev)
        struct ishtp_device *ishtp_dev = pci_get_drvdata(pdev);
 
        ishtp_bus_remove_all_clients(ishtp_dev, false);
+       pdev->dev_flags &= ~PCI_DEV_FLAGS_NO_D3;
        ish_device_disable(ishtp_dev);
 }