]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: hide unused usbfs_notify_suspend/resume functions
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 May 2023 20:17:42 +0000 (22:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:21 +0000 (08:37 +0200)
commit8e8dae8eb230619ae623c85b550d5373eda72167
treef4bc376913b51a0dcafd27a427bd4df8564ebb66
parentfe9cdc19861950582f077f254a12026e169eaee5
usb: hide unused usbfs_notify_suspend/resume functions

[ Upstream commit 8e6bd945e6dde64fbc60ec3fe252164493a8d3a2 ]

The declaration is in an #ifdef, which causes warnings when building
with 'make W=1' and without CONFIG_PM:

drivers/usb/core/devio.c:742:6: error: no previous prototype for 'usbfs_notify_suspend'
drivers/usb/core/devio.c:747:6: error: no previous prototype for 'usbfs_notify_resume'

Use the same #ifdef check around the function definitions to avoid
the warnings and slightly shrink the USB core.

Fixes: 7794f486ed0b ("usbfs: Add ioctls for runtime power management")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230516202103.558301-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/core/devio.c