extcon: Remove potential problem when calling extcon_register_notifier()
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 19 Dec 2016 12:02:33 +0000 (21:02 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 9 Jan 2017 01:04:11 +0000 (10:04 +0900)
commit01b4c9a1ae07a25d208cad0da7dd288007a22984
treeb2ea5327ee32d4b760dc7fefbd4edb36b036a787
parentdd3a55fc688b835b25fc73a16f17a75b6059858d
extcon: Remove potential problem when calling extcon_register_notifier()

This patch removes the potential problem of extcon_register_notifier()
when edev parameter is NULL. When edev is NULL, this function returns
the first extcon device which includes the sepecific external connector
of second paramter. But, it don't guarantee the same operation in all cases.
To remove this confusion and potential problem, this patch fixes it.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c