usb: gadget: xudc: Refactor update data role work
authorWayne Chang <waynec@nvidia.com>
Fri, 16 Dec 2022 04:20:26 +0000 (12:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 16:19:09 +0000 (17:19 +0100)
commit2582d629c9e01687aee905ac0bce33615a8a004a
treeb61bb5d2ab11668d3a83899180b8c01c14bc9145
parent569d23e9bf58464887c55aa0d2bdb0ead97f8592
usb: gadget: xudc: Refactor update data role work

The notification call chain should be registered after the device gets
ready. Otherwise, we  might get errors when setting data roles in an
incomplete system.

This patch refactors update data role work and register the notifier
call chain after the system gets ready.

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Haotien Hsu <haotienh@nvidia.com>
Link: https://lore.kernel.org/r/20221216042026.98517-1-haotienh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/tegra-xudc.c