All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()'
@ 2013-05-20 13:55 Fabio Estevam
  2013-05-20 13:55 ` [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Fabio Estevam @ 2013-05-20 13:55 UTC (permalink / raw)
  To: gregkh; +Cc: kernel, shawn.guo, linux-kernel, Fabio Estevam

Check the return value of 'regulator_enable()' to fix the following build error:

drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe':
drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/staging/imx-drm/imx-tve.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index a6efa8f6..ce65ad3 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -668,7 +668,9 @@ static int imx_tve_probe(struct platform_device *pdev)
 	tve->dac_reg = devm_regulator_get(&pdev->dev, "dac");
 	if (!IS_ERR(tve->dac_reg)) {
 		regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
-		regulator_enable(tve->dac_reg);
+		ret = regulator_enable(tve->dac_reg);
+		if (ret)
+			return ret;
 	}
 
 	tve->clk = devm_clk_get(&pdev->dev, "tve");
-- 
1.8.1.2



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

* [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl
  2013-05-20 13:55 [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Fabio Estevam
@ 2013-05-20 13:55 ` Fabio Estevam
  2013-05-21  2:40   ` Shawn Guo
  2013-05-20 13:55 ` [PATCH 3/3] imx-drm: parallel-display: " Fabio Estevam
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2013-05-20 13:55 UTC (permalink / raw)
  To: gregkh; +Cc: kernel, shawn.guo, linux-kernel, Fabio Estevam

Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove 
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/staging/imx-drm/imx-tve.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index ce65ad3..a56797d 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -22,7 +22,6 @@
 #include <linux/clk-provider.h>
 #include <linux/module.h>
 #include <linux/of_i2c.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spinlock.h>
@@ -610,15 +609,6 @@ static int imx_tve_probe(struct platform_device *pdev)
 	}
 
 	if (tve->mode == TVE_MODE_VGA) {
-		struct pinctrl *pinctrl;
-
-		pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-		if (IS_ERR(pinctrl)) {
-			ret = PTR_ERR(pinctrl);
-			dev_warn(&pdev->dev, "failed to setup pinctrl: %d", ret);
-			return ret;
-		}
-
 		ret = of_property_read_u32(np, "fsl,hsync-pin", &tve->hsync_pin);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "failed to get vsync pin\n");
-- 
1.8.1.2



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

* [PATCH 3/3] imx-drm: parallel-display: Let device core handle pinctrl
  2013-05-20 13:55 [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Fabio Estevam
  2013-05-20 13:55 ` [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
@ 2013-05-20 13:55 ` Fabio Estevam
  2013-05-21  2:41   ` Shawn Guo
  2013-05-21  2:39 ` [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Shawn Guo
  2013-05-21  6:38 ` Sascha Hauer
  3 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2013-05-20 13:55 UTC (permalink / raw)
  To: gregkh; +Cc: kernel, shawn.guo, linux-kernel, Fabio Estevam

Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove 
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/staging/imx-drm/parallel-display.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index e7fba62..f324ed3 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -23,7 +23,6 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <linux/videodev2.h>
-#include <linux/pinctrl/consumer.h>
 
 #include "imx-drm.h"
 
@@ -206,20 +205,11 @@ static int imx_pd_probe(struct platform_device *pdev)
 	struct imx_parallel_display *imxpd;
 	int ret;
 	const char *fmt;
-	struct pinctrl *pinctrl;
 
 	imxpd = devm_kzalloc(&pdev->dev, sizeof(*imxpd), GFP_KERNEL);
 	if (!imxpd)
 		return -ENOMEM;
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		ret = PTR_ERR(pinctrl);
-		dev_warn(&pdev->dev, "pinctrl_get_select_default failed with %d",
-				ret);
-		return ret;
-	}
-
 	edidp = of_get_property(np, "edid", &imxpd->edid_len);
 	if (edidp)
 		imxpd->edid = kmemdup(edidp, imxpd->edid_len, GFP_KERNEL);
-- 
1.8.1.2



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

* Re: [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()'
  2013-05-20 13:55 [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Fabio Estevam
  2013-05-20 13:55 ` [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
  2013-05-20 13:55 ` [PATCH 3/3] imx-drm: parallel-display: " Fabio Estevam
@ 2013-05-21  2:39 ` Shawn Guo
  2013-05-21  6:38 ` Sascha Hauer
  3 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2013-05-21  2:39 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, kernel, linux-kernel

On Mon, May 20, 2013 at 10:55:49AM -0300, Fabio Estevam wrote:
> Check the return value of 'regulator_enable()' to fix the following build error:
> 
s/error/warning

It may be helpful to mention that the warning shows up since commit
c8801a8 (regulator: core: Mark all get and enable calls as
__must_check).

Other than these, 

Acked-by: Shawn Guo <shawn.guo@linaro.org>

> drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe':
> drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/staging/imx-drm/imx-tve.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
> index a6efa8f6..ce65ad3 100644
> --- a/drivers/staging/imx-drm/imx-tve.c
> +++ b/drivers/staging/imx-drm/imx-tve.c
> @@ -668,7 +668,9 @@ static int imx_tve_probe(struct platform_device *pdev)
>  	tve->dac_reg = devm_regulator_get(&pdev->dev, "dac");
>  	if (!IS_ERR(tve->dac_reg)) {
>  		regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
> -		regulator_enable(tve->dac_reg);
> +		ret = regulator_enable(tve->dac_reg);
> +		if (ret)
> +			return ret;
>  	}
>  
>  	tve->clk = devm_clk_get(&pdev->dev, "tve");
> -- 
> 1.8.1.2
> 
> 


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

* Re: [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl
  2013-05-20 13:55 ` [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
@ 2013-05-21  2:40   ` Shawn Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2013-05-21  2:40 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, kernel, linux-kernel

On Mon, May 20, 2013 at 10:55:50AM -0300, Fabio Estevam wrote:
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
> we can rely on device core for handling pinctrl, so remove 
> devm_pinctrl_get_select_default() from the driver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Shawn Guo <shawn.guo@linaro.org>


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

* Re: [PATCH 3/3] imx-drm: parallel-display: Let device core handle pinctrl
  2013-05-20 13:55 ` [PATCH 3/3] imx-drm: parallel-display: " Fabio Estevam
@ 2013-05-21  2:41   ` Shawn Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2013-05-21  2:41 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, kernel, linux-kernel

On Mon, May 20, 2013 at 10:55:51AM -0300, Fabio Estevam wrote:
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
> we can rely on device core for handling pinctrl, so remove 
> devm_pinctrl_get_select_default() from the driver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Shawn Guo <shawn.guo@linaro.org>


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

* Re: [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()'
  2013-05-20 13:55 [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Fabio Estevam
                   ` (2 preceding siblings ...)
  2013-05-21  2:39 ` [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Shawn Guo
@ 2013-05-21  6:38 ` Sascha Hauer
  3 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2013-05-21  6:38 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: gregkh, kernel, shawn.guo, linux-kernel

On Mon, May 20, 2013 at 10:55:49AM -0300, Fabio Estevam wrote:
> Check the return value of 'regulator_enable()' to fix the following build error:
> 
> drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe':
> drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

All three:

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

end of thread, other threads:[~2013-05-21  6:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-20 13:55 [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Fabio Estevam
2013-05-20 13:55 ` [PATCH 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
2013-05-21  2:40   ` Shawn Guo
2013-05-20 13:55 ` [PATCH 3/3] imx-drm: parallel-display: " Fabio Estevam
2013-05-21  2:41   ` Shawn Guo
2013-05-21  2:39 ` [PATCH 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()' Shawn Guo
2013-05-21  6:38 ` Sascha Hauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.