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>
This commit is contained in:
@@ -112,7 +112,6 @@ static int adc_jack_probe(struct platform_device *pdev)
|
||||
dev_err(&pdev->dev, "failed to allocate extcon device\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
data->edev->dev.parent = &pdev->dev;
|
||||
data->edev->name = pdata->name;
|
||||
|
||||
/* Check the length of array and set num_cables */
|
||||
|
||||
Reference in New Issue
Block a user