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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:25 +0000 (08:13 +0200)
commita7571df08b49d931effe77448080b0098a383e3e
treed88c312e1b3ee465d6339c835efd18a9b85b0740
parent92792adf6bed4019efdeef6a948c1fa160e85b49
net: macb: fix wakeup test in runtime suspend/resume routines

[ Upstream commit 515a10a701d570e26dfbe6ee373f77c8bf11053f ]

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: d54f89af6cc4 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cadence/macb_main.c