extcon: Implement OF-based extcon lookup properly
extcon: Implement OF-based extcon lookup properly

Platform bus is not the only way to have extcon devices, so current
implementation of of_extcon_get_extcon_dev() is broken. Also using
parent device node only to get device name is quite ugly.

This patch reimplements of_extcon_get_extcon_dev() to do exactly the
same as extcon_get_extcon_dev() but instead of comparing names, compare
node pointers.

Signed-off-by: Tomasz Figa <69861c78e6f8ec8c6fbfd1c06050c87cda6b23eb@gmail.com>
[mszyprow: simplified the code]
Signed-off-by: Marek Szyprowski <2a0259761cc3e88db42be5300c1579a67c77e65e@samsung.com>
Signed-off-by: Chanwoo Choi <42eed19c0f56a8d487deac90c6d19d6364b7ba73@samsung.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs