net: ethernet: ave: Avoid lockdep warning
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Wed, 15 Jan 2020 04:02:42 +0000 (13:02 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:52 +0000 (08:22 +0100)
commit591c90ea13290ee293fd0a68ec511cff0b07cf00
tree67fff449e39b88053da9b1ea566397e144daff70
parent698f8c20892d359260dc844513e8d23aa27ff8ce
net: ethernet: ave: Avoid lockdep warning

[ Upstream commit 82d5d6a638cbd12b7dfe8acafd9efd87a656cc06 ]

When building with PROVE_LOCKING=y, lockdep shows the following
dump message.

    INFO: trying to register non-static key.
    the code is fine but needs lockdep annotation.
    turning off the locking correctness validator.
     ...

Calling device_set_wakeup_enable() directly occurs this issue,
and it isn't necessary for initialization, so this patch creates
internal function __ave_ethtool_set_wol() and replaces with this
in ave_init() and ave_resume().

Fixes: 7200f2e3c9e2 ("net: ethernet: ave: Set initial wol state to disabled")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/socionext/sni_ave.c