lkml.org 
[lkml]   [2014]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] extcon: Set parent device of extcon device using prameter of devm_extcon_dev_allocate
On Fri, May 30, 2014 at 10:41:39AM +0900, Chanwoo Choi wrote:
> 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>
> 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>
> ---
> drivers/extcon/extcon-adc-jack.c | 1 -
> drivers/extcon/extcon-arizona.c | 1 -
> drivers/extcon/extcon-class.c | 2 ++
> drivers/extcon/extcon-gpio.c | 1 -
> drivers/extcon/extcon-max77693.c | 1 -
> drivers/extcon/extcon-max8997.c | 1 -
> drivers/extcon/extcon-palmas.c | 1 -
> 7 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
> index e18f95b..d860229 100644
> --- a/drivers/extcon/extcon-adc-jack.c
> +++ b/drivers/extcon/extcon-adc-jack.c
> @@ -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 */
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index c634796..d9bd3c3 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -1165,7 +1165,6 @@ static int arizona_extcon_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
> info->edev->name = "Headset Jack";
> - info->edev->dev.parent = arizona->dev;
>
> ret = devm_extcon_dev_register(&pdev->dev, info->edev);

This changes the parent device for the Arizona stuff, I don't
think this is a problem but I should probably test here first.

Thanks,
Charles


\
 
 \ /
  Last update: 2014-05-30 12:21    [W:0.050 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site