]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: fix wakeup test in runtime suspend/resume routines
authorNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 10 Jul 2020 12:46:41 +0000 (14:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jul 2020 21:29:37 +0000 (14:29 -0700)
commit3fbb31aacce3c83882e4bb734835e16a9664d3ec
tree32996c6b205620e76a702244fc0610067d1eebf0
parent2458ad00d99c96d2504d61e5e9cbc4c487060248
net: macb: fix wakeup test in runtime suspend/resume routines

Use the proper struct device pointer to check if the wakeup flag
and wakeup source are positioned.
Use the one passed by function call which is equivalent to
&bp->dev->dev.parent.

It's preventing the trigger of a spurious interrupt in case the
Wake-on-Lan feature is used.

Fixes: 03c922bc9154 ("net: macb: Add pm runtime support")
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c