]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
jme: Fix device PM wakeup API usage
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Sat, 5 Mar 2016 00:11:56 +0000 (08:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Mar 2016 20:39:45 +0000 (15:39 -0500)
commit81422e672f8181d7ad1ee6c60c723aac649f538f
treee77edbbdb9fb1dd4b0cbea06145946d3b30cd30a
parent0772a99b818079e628a1da122ac7ee023faed83e
jme: Fix device PM wakeup API usage

According to Documentation/power/devices.txt

The driver should not use device_set_wakeup_enable() which is the policy
for user to decide.

Using device_init_wakeup() to initialize dev->power.should_wakeup and
dev->power.can_wakeup on driver initialization.

And use device_may_wakeup() on suspend to decide if WoL function should
be enabled on NIC.

Reported-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/jme.c