usb: chipidea: core: wrap ci_handle_power_lost() with CONFIG_PM_SLEEP
authorXu Yang <xu.yang_2@nxp.com>
Wed, 26 Oct 2022 12:11:57 +0000 (20:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Nov 2022 11:37:44 +0000 (12:37 +0100)
commitdced88922c1179dfa2664690318d4cba57ebffb5
treecc1c6d6fa17d885100a18c8dd7f3bc98aad631e1
parent77ece8123fed2bef451ef31a34b8327849375d26
usb: chipidea: core: wrap ci_handle_power_lost() with CONFIG_PM_SLEEP

If CONFIG_PM_SLEEP is not set, the following error will be shown up
when build kernel:
    error: 'ci_handle_power_lost' defined but not used.

This will move ci_handle_power_lost() to an area wrapped by
CONFIG_PM_SLEEP.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Fixes: 74494b33211d ("usb: chipidea: core: add controller resume support when controller is powered off")
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221026121157.1491302-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c