From ac65a625a0961e7a96f2e5e182073691d0474c04 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Fri, 30 May 2014 10:13:15 +0900 Subject: 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 Reported-by: Charles Keepax Tested-by: Charles Keepax Cc: Charles Keepax Cc: Mark Brown Cc: Graeme Gregory Cc: Kishon Vijay Abraham I Cc: Krzysztof Kozlowski --- drivers/extcon/extcon-class.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/extcon/extcon-class.c') 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, return edev; } + edev->dev.parent = dev; + *ptr = edev; devres_add(dev, ptr); -- cgit v1.2.3