]> git.baikalelectronics.ru Git - kernel.git/commit
ravb: avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Aug 2016 15:30:29 +0000 (17:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Aug 2016 06:32:11 +0000 (23:32 -0700)
commit03c0c5b497ff003bc670bdfe71f147026c020214
treee9e05ffd9d792b1ad55f59df49cec83472c0b8ed
parent7baf5f2f5b5fcd71ea94499345b56d5d68b3da68
ravb: avoid unused function warnings

When CONFIG_PM_SLEEP is disabled, we get a couple of harmless warnings:

drivers/net/ethernet/renesas/ravb_main.c:2117:12: error: 'ravb_resume' defined but not used [-Werror=unused-function]
drivers/net/ethernet/renesas/ravb_main.c:2104:12: error: 'ravb_suspend' defined but not used [-Werror=unused-function]

The simplest solution here is to replace the #ifdef with __maybe_unused
annotations, which lets the compiler do the right thing by itself.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2297a0d5091b ("ravb: add sleep PM suspend/resume support")
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c