Removed the usb_state_changed() function that was called by usb_init() without meaning. 15/225715/2
authorINSUN PYO <insun.pyo@samsung.com>
Mon, 24 Feb 2020 06:09:30 +0000 (15:09 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Mon, 24 Feb 2020 06:23:26 +0000 (15:23 +0900)
commit76c19d917472254e019945d2d036dd371143b766
tree292e464e5ff48c0832ef21283e8abaa55073bea3
parent5e0411aa7b79261fc314a53dc03fa6a4a297c7ab
Removed the usb_state_changed() function that was called by usb_init() without meaning.

The following call stack ensures that usb_state_changed() is called after usb_init.
///////////////////////////////////////////////////////////////////////////////////////////////////////////
extcon_init() --> usb_init() -->
event_handler_state_changed (DEVICE_NOTIFIER_STATE_START) --> add_extcon_event_handler() -->
get_extcon_init_state() -> config_parse() -> extcon_load_uevent() -> extcon_update() -> usb_state_changed()
///////////////////////////////////////////////////////////////////////////////////////////////////////////

Also, when usb_state_changed() is called from usb_init,
the extcon value is always -1 because the extcon initial value has not yet been retrieved.

The initial state of usb_state_changed() is -1, and usb_state_changed(-1) does nothing.

Change-Id: I77d774c9a396b3773203a69db83aa408e315205a
src/usb/usb.c