linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: mc13xxx-core: use of_property_read_bool()
@ 2015-11-16  9:13 Saurabh Sengar
  2015-11-24 16:29 ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Saurabh Sengar @ 2015-11-16  9:13 UTC (permalink / raw)
  To: lee.jones, linux-kernel; +Cc: Saurabh Sengar

for checking if a property is present or not,
use of_property_read_bool instead of of_get_property()

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
 drivers/mfd/mc13xxx-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 3f9f4c8..d7f54e4 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -383,16 +383,16 @@ static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
 	if (!np)
 		return -ENODEV;
 
-	if (of_get_property(np, "fsl,mc13xxx-uses-adc", NULL))
+	if (of_property_read_bool(np, "fsl,mc13xxx-uses-adc"))
 		mc13xxx->flags |= MC13XXX_USE_ADC;
 
-	if (of_get_property(np, "fsl,mc13xxx-uses-codec", NULL))
+	if (of_property_read_bool(np, "fsl,mc13xxx-uses-codec"))
 		mc13xxx->flags |= MC13XXX_USE_CODEC;
 
-	if (of_get_property(np, "fsl,mc13xxx-uses-rtc", NULL))
+	if (of_property_read_bool(np, "fsl,mc13xxx-uses-rtc"))
 		mc13xxx->flags |= MC13XXX_USE_RTC;
 
-	if (of_get_property(np, "fsl,mc13xxx-uses-touch", NULL))
+	if (of_property_read_bool(np, "fsl,mc13xxx-uses-touch"))
 		mc13xxx->flags |= MC13XXX_USE_TOUCHSCREEN;
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: mc13xxx-core: use of_property_read_bool()
  2015-11-16  9:13 [PATCH] mfd: mc13xxx-core: use of_property_read_bool() Saurabh Sengar
@ 2015-11-24 16:29 ` Lee Jones
  2015-12-03  4:48   ` Saurabh Sengar
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2015-11-24 16:29 UTC (permalink / raw)
  To: Saurabh Sengar; +Cc: linux-kernel

On Mon, 16 Nov 2015, Saurabh Sengar wrote:

> for checking if a property is present or not,
> use of_property_read_bool instead of of_get_property()
> 
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
> ---
>  drivers/mfd/mc13xxx-core.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

I'm fine with the change, but in future please use the commit format
expected of the subsystem.  In this case, you are missing upper-case
characters at the start of the subject line AND the start of the
commit log.  In fact, it is devoid of sufficient punctuation in
general.

I have applied this and fixed up the issues; this time!

> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
> index 3f9f4c8..d7f54e4 100644
> --- a/drivers/mfd/mc13xxx-core.c
> +++ b/drivers/mfd/mc13xxx-core.c
> @@ -383,16 +383,16 @@ static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
>  	if (!np)
>  		return -ENODEV;
>  
> -	if (of_get_property(np, "fsl,mc13xxx-uses-adc", NULL))
> +	if (of_property_read_bool(np, "fsl,mc13xxx-uses-adc"))
>  		mc13xxx->flags |= MC13XXX_USE_ADC;
>  
> -	if (of_get_property(np, "fsl,mc13xxx-uses-codec", NULL))
> +	if (of_property_read_bool(np, "fsl,mc13xxx-uses-codec"))
>  		mc13xxx->flags |= MC13XXX_USE_CODEC;
>  
> -	if (of_get_property(np, "fsl,mc13xxx-uses-rtc", NULL))
> +	if (of_property_read_bool(np, "fsl,mc13xxx-uses-rtc"))
>  		mc13xxx->flags |= MC13XXX_USE_RTC;
>  
> -	if (of_get_property(np, "fsl,mc13xxx-uses-touch", NULL))
> +	if (of_property_read_bool(np, "fsl,mc13xxx-uses-touch"))
>  		mc13xxx->flags |= MC13XXX_USE_TOUCHSCREEN;
>  
>  	return 0;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: mc13xxx-core: use of_property_read_bool()
  2015-11-24 16:29 ` Lee Jones
@ 2015-12-03  4:48   ` Saurabh Sengar
  0 siblings, 0 replies; 3+ messages in thread
From: Saurabh Sengar @ 2015-12-03  4:48 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel

I couldn't see this patch applied in linux-next branch still.

Regards,
Saurabh

On 24 November 2015 at 21:59, Lee Jones <lee.jones@linaro.org> wrote:
> On Mon, 16 Nov 2015, Saurabh Sengar wrote:
>
>> for checking if a property is present or not,
>> use of_property_read_bool instead of of_get_property()
>>
>> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
>> ---
>>  drivers/mfd/mc13xxx-core.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> I'm fine with the change, but in future please use the commit format
> expected of the subsystem.  In this case, you are missing upper-case
> characters at the start of the subject line AND the start of the
> commit log.  In fact, it is devoid of sufficient punctuation in
> general.
>
> I have applied this and fixed up the issues; this time!
>
>> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
>> index 3f9f4c8..d7f54e4 100644
>> --- a/drivers/mfd/mc13xxx-core.c
>> +++ b/drivers/mfd/mc13xxx-core.c
>> @@ -383,16 +383,16 @@ static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
>>       if (!np)
>>               return -ENODEV;
>>
>> -     if (of_get_property(np, "fsl,mc13xxx-uses-adc", NULL))
>> +     if (of_property_read_bool(np, "fsl,mc13xxx-uses-adc"))
>>               mc13xxx->flags |= MC13XXX_USE_ADC;
>>
>> -     if (of_get_property(np, "fsl,mc13xxx-uses-codec", NULL))
>> +     if (of_property_read_bool(np, "fsl,mc13xxx-uses-codec"))
>>               mc13xxx->flags |= MC13XXX_USE_CODEC;
>>
>> -     if (of_get_property(np, "fsl,mc13xxx-uses-rtc", NULL))
>> +     if (of_property_read_bool(np, "fsl,mc13xxx-uses-rtc"))
>>               mc13xxx->flags |= MC13XXX_USE_RTC;
>>
>> -     if (of_get_property(np, "fsl,mc13xxx-uses-touch", NULL))
>> +     if (of_property_read_bool(np, "fsl,mc13xxx-uses-touch"))
>>               mc13xxx->flags |= MC13XXX_USE_TOUCHSCREEN;
>>
>>       return 0;
>
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-03  4:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16  9:13 [PATCH] mfd: mc13xxx-core: use of_property_read_bool() Saurabh Sengar
2015-11-24 16:29 ` Lee Jones
2015-12-03  4:48   ` Saurabh Sengar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).