* [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error
[not found] <1294749833-32019-1-git-send-email-jamie@jamieiles.com>
@ 2011-01-11 12:43 ` Jamie Iles
2011-01-11 21:14 ` Russell King - ARM Linux
2011-01-12 2:21 ` Kukjin Kim
2011-01-11 12:43 ` [PATCH 09/16] ARM: pxa: " Jamie Iles
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-arm-kernel
clk_get() returns a struct clk cookie to the driver and some platforms
may return NULL if they only support a single clock. clk_get() has only
failed if it returns a ERR_PTR() encoded pointer.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/serial/samsung.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index 7ac2bf5..be93d2f 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -42,6 +42,7 @@
#include <linux/serial.h>
#include <linux/delay.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <linux/cpufreq.h>
#include <asm/irq.h>
@@ -522,7 +523,7 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc,
unsigned long rate;
calc->src = clk_get(port->dev, clksrc->name);
- if (calc->src == NULL || IS_ERR(calc->src))
+ if (IS_ERR(calc->src))
return 0;
rate = clk_get_rate(calc->src);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 09/16] ARM: pxa: don't treat NULL clk as an error
[not found] <1294749833-32019-1-git-send-email-jamie@jamieiles.com>
2011-01-11 12:43 ` [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error Jamie Iles
@ 2011-01-11 12:43 ` Jamie Iles
2011-01-11 21:14 ` Russell King - ARM Linux
2011-01-11 12:43 ` [PATCH 16/16] w1: mxc_w1: " Jamie Iles
[not found] ` <1294749833-32019-7-git-send-email-jamie@jamieiles.com>
3 siblings, 1 reply; 10+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-arm-kernel
clk_get() returns a struct clk cookie to the driver and some platforms
may return NULL if they only support a single clock. clk_get() has only
failed if it returns a ERR_PTR() encoded pointer.
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/pcmcia/pxa2xx_base.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 3755e7c..6e5b55e 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -16,6 +16,7 @@
======================================================================*/
+#include <linux/err.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
@@ -297,8 +298,8 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
}
clk = clk_get(&dev->dev, NULL);
- if (!clk)
- return -ENODEV;
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
pxa2xx_drv_pcmcia_ops(ops);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 16/16] w1: mxc_w1: don't treat NULL clk as an error
[not found] <1294749833-32019-1-git-send-email-jamie@jamieiles.com>
2011-01-11 12:43 ` [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error Jamie Iles
2011-01-11 12:43 ` [PATCH 09/16] ARM: pxa: " Jamie Iles
@ 2011-01-11 12:43 ` Jamie Iles
2011-01-11 15:10 ` Sascha Hauer
2011-01-11 21:15 ` Russell King - ARM Linux
[not found] ` <1294749833-32019-7-git-send-email-jamie@jamieiles.com>
3 siblings, 2 replies; 10+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-arm-kernel
clk_get() returns a struct clk cookie to the driver and some platforms
may return NULL if they only support a single clock. clk_get() has only
failed if it returns a ERR_PTR() encoded pointer.
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/w1/masters/mxc_w1.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
index a3b6a74..67ea082 100644
--- a/drivers/w1/masters/mxc_w1.c
+++ b/drivers/w1/masters/mxc_w1.c
@@ -21,6 +21,7 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/io.h>
@@ -118,8 +119,8 @@ static int __devinit mxc_w1_probe(struct platform_device *pdev)
return -ENOMEM;
mdev->clk = clk_get(&pdev->dev, "owire");
- if (!mdev->clk) {
- err = -ENODEV;
+ if (IS_ERR(mdev->clk)) {
+ err = PTR_ERR(mdev->clk);
goto failed_clk;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 16/16] w1: mxc_w1: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 16/16] w1: mxc_w1: " Jamie Iles
@ 2011-01-11 15:10 ` Sascha Hauer
2011-01-11 21:15 ` Russell King - ARM Linux
1 sibling, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2011-01-11 15:10 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 11, 2011 at 12:43:53PM +0000, Jamie Iles wrote:
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/w1/masters/mxc_w1.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
> index a3b6a74..67ea082 100644
> --- a/drivers/w1/masters/mxc_w1.c
> +++ b/drivers/w1/masters/mxc_w1.c
> @@ -21,6 +21,7 @@
> #include <linux/interrupt.h>
> #include <linux/platform_device.h>
> #include <linux/clk.h>
> +#include <linux/err.h>
> #include <linux/slab.h>
> #include <linux/delay.h>
> #include <linux/io.h>
> @@ -118,8 +119,8 @@ static int __devinit mxc_w1_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> mdev->clk = clk_get(&pdev->dev, "owire");
> - if (!mdev->clk) {
> - err = -ENODEV;
> + if (IS_ERR(mdev->clk)) {
> + err = PTR_ERR(mdev->clk);
> goto failed_clk;
> }
>
> --
> 1.7.3.4
>
>
--
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] 10+ messages in thread
* [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error Jamie Iles
@ 2011-01-11 21:14 ` Russell King - ARM Linux
2011-01-12 2:21 ` Kukjin Kim
1 sibling, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-01-11 21:14 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 11, 2011 at 12:43:45PM +0000, Jamie Iles wrote:
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 09/16] ARM: pxa: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 09/16] ARM: pxa: " Jamie Iles
@ 2011-01-11 21:14 ` Russell King - ARM Linux
0 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-01-11 21:14 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 11, 2011 at 12:43:46PM +0000, Jamie Iles wrote:
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
Good catch.
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 16/16] w1: mxc_w1: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 16/16] w1: mxc_w1: " Jamie Iles
2011-01-11 15:10 ` Sascha Hauer
@ 2011-01-11 21:15 ` Russell King - ARM Linux
1 sibling, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-01-11 21:15 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 11, 2011 at 12:43:53PM +0000, Jamie Iles wrote:
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
Another good catch.
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Thanks for doing this.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 06/16] nuc900fb: don't treat NULL clk as an error
[not found] ` <1294749833-32019-7-git-send-email-jamie@jamieiles.com>
@ 2011-01-12 1:24 ` Wan ZongShun
2011-01-12 6:00 ` Paul Mundt
0 siblings, 1 reply; 10+ messages in thread
From: Wan ZongShun @ 2011-01-12 1:24 UTC (permalink / raw)
To: linux-arm-kernel
2011/1/11 Jamie Iles <jamie@jamieiles.com>:
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. ?clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: linux-fbdev at vger.kernel.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
> ?drivers/video/nuc900fb.c | ? ?5 +++--
> ?1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
> index 81687ed..62498bd 100644
> --- a/drivers/video/nuc900fb.c
> +++ b/drivers/video/nuc900fb.c
> @@ -15,6 +15,7 @@
> ?*/
> ?#include <linux/module.h>
> ?#include <linux/kernel.h>
> +#include <linux/err.h>
> ?#include <linux/errno.h>
> ?#include <linux/string.h>
> ?#include <linux/mm.h>
> @@ -597,9 +598,9 @@ static int __devinit nuc900fb_probe(struct platform_device *pdev)
> ? ? ? ?}
>
> ? ? ? ?fbi->clk = clk_get(&pdev->dev, NULL);
> - ? ? ? if (!fbi->clk || IS_ERR(fbi->clk)) {
> + ? ? ? if (IS_ERR(fbi->clk)) {
> ? ? ? ? ? ? ? ?printk(KERN_ERR "nuc900-lcd:failed to get lcd clock source\n");
> - ? ? ? ? ? ? ? ret = -ENOENT;
> + ? ? ? ? ? ? ? ret = PTR_ERR(fbi->clk);
> ? ? ? ? ? ? ? ?goto release_irq;
> ? ? ? ?}
>
Hi,
Thanks for your patch.
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
> --
> 1.7.3.4
>
>
--
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel at lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
* linux-arm-NUC900 mailing list
mail addr:NUC900 at googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com at gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error Jamie Iles
2011-01-11 21:14 ` Russell King - ARM Linux
@ 2011-01-12 2:21 ` Kukjin Kim
1 sibling, 0 replies; 10+ messages in thread
From: Kukjin Kim @ 2011-01-12 2:21 UTC (permalink / raw)
To: linux-arm-kernel
Jamie Iles wrote:
>
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
> drivers/serial/samsung.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
> index 7ac2bf5..be93d2f 100644
> --- a/drivers/serial/samsung.c
> +++ b/drivers/serial/samsung.c
> @@ -42,6 +42,7 @@
> #include <linux/serial.h>
> #include <linux/delay.h>
> #include <linux/clk.h>
> +#include <linux/err.h>
> #include <linux/cpufreq.h>
>
> #include <asm/irq.h>
> @@ -522,7 +523,7 @@ static int s3c24xx_serial_calcbaud(struct baud_calc
*calc,
> unsigned long rate;
>
> calc->src = clk_get(port->dev, clksrc->name);
> - if (calc->src == NULL || IS_ERR(calc->src))
> + if (IS_ERR(calc->src))
> return 0;
>
> rate = clk_get_rate(calc->src);
> --
1.7.3.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 06/16] nuc900fb: don't treat NULL clk as an error
2011-01-12 1:24 ` [PATCH 06/16] nuc900fb: " Wan ZongShun
@ 2011-01-12 6:00 ` Paul Mundt
0 siblings, 0 replies; 10+ messages in thread
From: Paul Mundt @ 2011-01-12 6:00 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 12, 2011 at 09:24:47AM +0800, Wan ZongShun wrote:
> 2011/1/11 Jamie Iles <jamie@jamieiles.com>:
> > clk_get() returns a struct clk cookie to the driver and some platforms
> > may return NULL if they only support a single clock. ??clk_get() has only
> > failed if it returns a ERR_PTR() encoded pointer.
> >
> > Cc: Wan ZongShun <mcuos.com@gmail.com>
> > Cc: linux-fbdev at vger.kernel.org
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
>
> Thanks for your patch.
>
> Acked-by: Wan ZongShun <mcuos.com@gmail.com>
>
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-12 6:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1294749833-32019-1-git-send-email-jamie@jamieiles.com>
2011-01-11 12:43 ` [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error Jamie Iles
2011-01-11 21:14 ` Russell King - ARM Linux
2011-01-12 2:21 ` Kukjin Kim
2011-01-11 12:43 ` [PATCH 09/16] ARM: pxa: " Jamie Iles
2011-01-11 21:14 ` Russell King - ARM Linux
2011-01-11 12:43 ` [PATCH 16/16] w1: mxc_w1: " Jamie Iles
2011-01-11 15:10 ` Sascha Hauer
2011-01-11 21:15 ` Russell King - ARM Linux
[not found] ` <1294749833-32019-7-git-send-email-jamie@jamieiles.com>
2011-01-12 1:24 ` [PATCH 06/16] nuc900fb: " Wan ZongShun
2011-01-12 6:00 ` Paul Mundt
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).