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]
Date:	Thu, 11 Jul 2013 08:38:11 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Chanwoo Choi <cw00.choi@...sung.com>
CC:	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"rob@...dley.net" <rob@...dley.net>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kishon@...com" <kishon@...com>,
	"gg@...mlogic.co.uk" <gg@...mlogic.co.uk>
Subject: Re: [PATCH V3] extcon: palmas: Option to disable ID/VBUS detection
 based on platform

On Thursday 11 July 2013 08:12 AM, Chanwoo Choi wrote:
> Hi Laxman,
>
>>   static int palmas_usb_probe(struct platform_device *pdev)
>> @@ -137,20 +140,26 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>   	struct palmas_usb *palmas_usb;
>>   	int status;
>>   
>> -	if (node && !pdata) {
>> -		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
>> -
>> -		if (!pdata)
>> -			return -ENOMEM;
>> +	palmas_usb = devm_kzalloc(&pdev->dev, sizeof(*palmas_usb), GFP_KERNEL);
>> +	if (!palmas_usb)
>> +		return -ENOMEM;
>>   
>> -		pdata->wakeup = of_property_read_bool(node, "ti,wakeup");
>> +	if (node && !pdata) {
>> +		palmas_usb->wakeup = of_property_read_bool(node, "ti,wakeup");
>> +		palmas_usb->enable_id_detection = of_property_read_bool(node,
>> +						"ti,enable-id-detection");
>> +		palmas_usb->enable_vbus_detection = of_property_read_bool(node,
>> +						"ti,enable-vbus-detection");
>> +	} else if (pdata) {
>> +		palmas_usb->wakeup = pdata->wakeup;
>> +		palmas_usb->enable_id_detection = true;
>> +		palmas_usb->enable_vbus_detection = true;
>>   	} else if (!pdata) {
>> -		return -EINVAL;
>> +		palmas_usb->wakeup = true;
>> +		palmas_usb->enable_id_detection = true;
>> +		palmas_usb->enable_vbus_detection = true;
>>   	}
> I think we could modify it as following patch to remove duplicate line.
> If you agree about below modification, I will apply your patch with following patch.
>
I am fine with this and this looks simple and straight.

I have seen some patches/discussion from TI to remove the platform data 
support at all and hence removing from here in future will be very simple.



--
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