public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check
@ 2015-07-02  3:22 Maninder Singh
  2015-07-07  7:18 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-07-02  3:22 UTC (permalink / raw)
  To: sameo, lee.jones, linux-kernel; +Cc: k.kozlowski, pankaj.m, Maninder Singh

 o Making pdata NULL check to (!pdata) as coding standard
	and all other checks in file.
 o Removing redundant check of pdata, because we already
	check for pdata, and also derefernced before this check.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
v2: changing subject line.

 drivers/mfd/t7l66xb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index c09fb5d..854b05f 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -318,7 +318,7 @@ static int t7l66xb_probe(struct platform_device *dev)
 	struct resource *iomem, *rscr;
 	int ret;
 
-	if (pdata == NULL)
+	if (!pdata)
 		return -EINVAL;
 
 	iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
@@ -371,7 +371,7 @@ static int t7l66xb_probe(struct platform_device *dev)
 
 	clk_prepare_enable(t7l66xb->clk48m);
 
-	if (pdata && pdata->enable)
+	if (pdata->enable)
 		pdata->enable(dev);
 
 	/* Mask all interrupts */
-- 
1.7.9.5


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

* Re: [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check
  2015-07-02  3:22 [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check Maninder Singh
@ 2015-07-07  7:18 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2015-07-07  7:18 UTC (permalink / raw)
  To: Maninder Singh; +Cc: sameo, linux-kernel, k.kozlowski, pankaj.m

On Thu, 02 Jul 2015, Maninder Singh wrote:

>  o Making pdata NULL check to (!pdata) as coding standard
> 	and all other checks in file.
>  o Removing redundant check of pdata, because we already
> 	check for pdata, and also derefernced before this check.
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> ---
> v2: changing subject line.
> 
>  drivers/mfd/t7l66xb.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
> index c09fb5d..854b05f 100644
> --- a/drivers/mfd/t7l66xb.c
> +++ b/drivers/mfd/t7l66xb.c
> @@ -318,7 +318,7 @@ static int t7l66xb_probe(struct platform_device *dev)
>  	struct resource *iomem, *rscr;
>  	int ret;
>  
> -	if (pdata == NULL)
> +	if (!pdata)
>  		return -EINVAL;
>  
>  	iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
> @@ -371,7 +371,7 @@ static int t7l66xb_probe(struct platform_device *dev)
>  
>  	clk_prepare_enable(t7l66xb->clk48m);
>  
> -	if (pdata && pdata->enable)
> +	if (pdata->enable)
>  		pdata->enable(dev);
>  
>  	/* Mask all interrupts */

-- 
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] 2+ messages in thread

end of thread, other threads:[~2015-07-07  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02  3:22 [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check Maninder Singh
2015-07-07  7:18 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox