UPSTREAM: extcon: Add resource-managed functions to register extcon notifier
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 27 Jun 2016 11:03:39 +0000 (20:03 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 3 Aug 2016 01:41:25 +0000 (09:41 +0800)
commitbe3c7f310dd7c92d58e406fbeb220ca2de291181
tree9c1f4a1af204952fa213e2e6579c650413abe83b
parentca4c2af56339d6eee68a7e36ac5d0b57688ef162
UPSTREAM: extcon: Add resource-managed functions to register extcon notifier

This patch adds the resource-managed functions for register/unregister
the extcon notifier with the id of each external connector. This function
will make it easy to handle the extcon notifier.

- int devm_extcon_register_notifier(struct device *dev,
struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb);
- void devm_extcon_unregister_notifier(struct device *dev,
struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb);

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
(cherry picked from commit 58f386560a68dd98bd6744a28fc853eef11faebe
  git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon-next)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Change-Id: I852184d12dc4a03b6d526112e998b087931726e5
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
drivers/extcon/devres.c
include/linux/extcon.h