]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:54 +0000 (14:48 -0700)
commite91b1dbdc1f064872a6a2bb2375ae9202dd5e6e0
tree45c6d6838d1b6f9b269138178085dfd7bb0afe14
parent1b06e9942d51804170631351ada984947e87f042
jme: Fix device PM wakeup API usage

commit 81422e672f8181d7ad1ee6c60c723aac649f538f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/jme.c