extcon: Simplify extcon_dev_register() prototype by removing unnecessary parameter
This patch remove extcon_dev_register()'s second parameter which means the pointer of parent device to simplify prototype of this function. So, if extcon device has the parent device, it should set the pointer of parent device to edev.dev.parent in extcon device driver instead of in extcon_dev_register(). Cc: Graeme Gregory <gg@slimlogic.co.uk> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
This commit is contained in:
@@ -110,6 +110,7 @@ static int adc_jack_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
data->edev.dev.parent = &pdev->dev;
|
||||
data->edev.supported_cable = pdata->cable_names;
|
||||
|
||||
/* Check the length of array and set num_cables */
|
||||
@@ -148,7 +149,7 @@ static int adc_jack_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, data);
|
||||
|
||||
err = extcon_dev_register(&data->edev, &pdev->dev);
|
||||
err = extcon_dev_register(&data->edev);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
Reference in New Issue
Block a user