]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: Deduplicate code in extcon_set_state_sync()
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 23 Nov 2021 14:53:01 +0000 (15:53 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 24 Dec 2021 06:27:52 +0000 (15:27 +0900)
commit8222f5f5d066a0763c9fd7ece7a4d8a6beb2b3be
treebea5a047d1c5ecf7c14566e58faf0b137ed59eeb
parentf0ac588b875c9544b954ed923b21c2df6ccee7fb
extcon: Deduplicate code in extcon_set_state_sync()

Finding the cable index and checking for changed status is also done
in extcon_set_state(). So calling extcon_set_state_sync() will do these
checks twice. Remove them and use these checks from extcon_set_state().

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c