jme: Fix device PM wakeup API usage
commit964787514290ffacd8eb051f3d34cbb200047f78
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Sat, 5 Mar 2016 00:11:56 +0000 (5 08:11 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:06:15 +0000 (1 00:06 +0200)
treeb28b63849dd4638cf8e778bb908597f6ed0d55a0
parentbf40aff79df3983d54d7c22467d1992a5039ee08
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: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/jme.c