Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276613 > unrolled thread

Re: [PATCH] mfd: mc13xxx-core: use of_property_read_bool()

Started byLee Jones <lee.jones@linaro.org>
First post2015-11-24 17:30 +0100
Last post2015-11-24 17:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mfd: mc13xxx-core: use of_property_read_bool() Lee Jones <lee.jones@linaro.org> - 2015-11-24 17:30 +0100

#1276613 — Re: [PATCH] mfd: mc13xxx-core: use of_property_read_bool()

FromLee Jones <lee.jones@linaro.org>
Date2015-11-24 17:30 +0100
SubjectRe: [PATCH] mfd: mc13xxx-core: use of_property_read_bool()
Message-ID<qyoDD-262-7@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web