lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <5387DC5E.7010907@samsung.com>
Date:	Fri, 30 May 2014 10:18:22 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
Cc:	myungjoo.ham@...sung.com, patches@...nsource.wolfsonmicro.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] extcon: arizona: Remove duplicate set of input parent
 device

Hi Charles,

On 05/30/2014 12:27 AM, Charles Keepax wrote:
> devm_input_allocate_device already sets the parent device to be that
> passed to it, we also set this manually in arizona_extcon_probe. This
> patch removes the redundant set from arizona_extcon_probe.
> 
> Signed-off-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
> ---
>  drivers/extcon/extcon-arizona.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index cf90743..21ee055 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -1186,7 +1186,6 @@ static int arizona_extcon_probe(struct platform_device *pdev)
>  
>  	info->input->name = "Headset";
>  	info->input->phys = "arizona/extcon";
> -	info->input->dev.parent = &pdev->dev;
>  
>  	if (pdata->num_micd_configs) {
>  		info->micd_modes = pdata->micd_configs;
> 

After checked this patch, I'm going to modify devm_extcon_dev_allocate()
to set parent device for extcon device as following patch.

Thanks,
Chanwoo Choi

commit b8ca2d99209e402faf12545759c8ed14fa3455a0
Author: Chanwoo Choi <cw00.choi@...sung.com>
Date:   Fri May 30 10:13:15 2014 +0900

    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@...sung.com>
    Reported-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>

diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
index 18d42c0..4c2f2c5 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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ