diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2014-05-29 21:13:15 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2014-06-16 00:33:19 -0400 |
commit | ac65a625a0961e7a96f2e5e182073691d0474c04 (patch) | |
tree | 5eb4f46f622366621a0d965569add88a830a6a97 /drivers/extcon/extcon-class.c | |
parent | 24a279b1cae0af0eb4bf0dd8b3ef85956a96ff7a (diff) |
extcon: Set parent device of extcon device using prameter of devm_extcon_dev_allocate
This patch set the parent device of extcon device using first parameter of
devm_extco_dev_allocate() to remove duplicate code on all of extcon provider
drivers.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reported-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-class.c')
-rw-r--r-- | drivers/extcon/extcon-class.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 18d42c0e4581..4c2f2c543bb7 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c | |||
@@ -645,6 +645,8 @@ struct extcon_dev *devm_extcon_dev_allocate(struct device *dev, | |||
645 | return edev; | 645 | return edev; |
646 | } | 646 | } |
647 | 647 | ||
648 | edev->dev.parent = dev; | ||
649 | |||
648 | *ptr = edev; | 650 | *ptr = edev; |
649 | devres_add(dev, ptr); | 651 | devres_add(dev, ptr); |
650 | 652 | ||