* [PATCH 03/16] input: tnetv107x-keypad: 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 12:43 ` [PATCH 04/16] input: tnetv107x-touchscreen: " Jamie Iles
1 sibling, 0 replies; 5+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Jamie Iles, Cyril Chemparathy, linux-input
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: Cyril Chemparathy <cyril@ti.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/input/keyboard/tnetv107x-keypad.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index b4a81eb..c8f097a 100644
--- a/drivers/input/keyboard/tnetv107x-keypad.c
+++ b/drivers/input/keyboard/tnetv107x-keypad.c
@@ -14,6 +14,7 @@
*/
#include <linux/kernel.h>
+#include <linux/err.h>
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/platform_device.h>
@@ -219,9 +220,9 @@ static int __devinit keypad_probe(struct platform_device *pdev)
}
kp->clk = clk_get(dev, NULL);
- if (!kp->clk) {
+ if (IS_ERR(kp->clk)) {
dev_err(dev, "cannot claim device clock\n");
- error = -EINVAL;
+ error = PTR_ERR(kp->clk);
goto error_clk;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 04/16] input: tnetv107x-touchscreen: 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 03/16] input: tnetv107x-keypad: don't treat NULL clk as an error Jamie Iles
@ 2011-01-11 12:43 ` Jamie Iles
2011-01-12 5:56 ` Dmitry Torokhov
1 sibling, 1 reply; 5+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Jamie Iles, Cyril Chemparathy, linux-input
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: Cyril Chemparathy <cyril@ti.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/input/touchscreen/tnetv107x-ts.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/tnetv107x-ts.c b/drivers/input/touchscreen/tnetv107x-ts.c
index cf1dba2..22a3411 100644
--- a/drivers/input/touchscreen/tnetv107x-ts.c
+++ b/drivers/input/touchscreen/tnetv107x-ts.c
@@ -14,6 +14,7 @@
*/
#include <linux/kernel.h>
+#include <linux/err.h>
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/platform_device.h>
@@ -289,9 +290,9 @@ static int __devinit tsc_probe(struct platform_device *pdev)
}
ts->clk = clk_get(dev, NULL);
- if (!ts->clk) {
+ if (IS_ERR(ts->clk)) {
dev_err(dev, "cannot claim device clock\n");
- error = -EINVAL;
+ error = PTR_ERR(ts->clk);
goto error_clk;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 04/16] input: tnetv107x-touchscreen: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 04/16] input: tnetv107x-touchscreen: " Jamie Iles
@ 2011-01-12 5:56 ` Dmitry Torokhov
2011-01-18 4:25 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2011-01-12 5:56 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-kernel, Cyril Chemparathy, linux-input
On Tue, Jan 11, 2011 at 12:43:41PM +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: Cyril Chemparathy <cyril@ti.com>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Applied both, thank you Jamie.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 04/16] input: tnetv107x-touchscreen: don't treat NULL clk as an error
2011-01-12 5:56 ` Dmitry Torokhov
@ 2011-01-18 4:25 ` Dmitry Torokhov
2011-01-18 4:35 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2011-01-18 4:25 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-kernel, Cyril Chemparathy, linux-input
On Tue, Jan 11, 2011 at 09:56:41PM -0800, Dmitry Torokhov wrote:
> On Tue, Jan 11, 2011 at 12:43:41PM +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: Cyril Chemparathy <cyril@ti.com>
> > Cc: linux-input@vger.kernel.org
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
>
> Applied both, thank you Jamie.
>
Actually, if we pass clk that is NULL along we going to get oops on many
arches, so I am going to change it to IS_ERR_OR_NULL.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 04/16] input: tnetv107x-touchscreen: don't treat NULL clk as an error
2011-01-18 4:25 ` Dmitry Torokhov
@ 2011-01-18 4:35 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2011-01-18 4:35 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-kernel, Cyril Chemparathy, linux-input
On Mon, Jan 17, 2011 at 08:25:35PM -0800, Dmitry Torokhov wrote:
> On Tue, Jan 11, 2011 at 09:56:41PM -0800, Dmitry Torokhov wrote:
> > On Tue, Jan 11, 2011 at 12:43:41PM +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: Cyril Chemparathy <cyril@ti.com>
> > > Cc: linux-input@vger.kernel.org
> > > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> >
> > Applied both, thank you Jamie.
> >
>
> Actually, if we pass clk that is NULL along we going to get oops on many
> arches, so I am going to change it to IS_ERR_OR_NULL.
>
Oh, wait... OK, I got confused by the changelog. IS_ERR is proper,
sorry.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-18 4:36 UTC | newest]
Thread overview: 5+ 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 03/16] input: tnetv107x-keypad: don't treat NULL clk as an error Jamie Iles
2011-01-11 12:43 ` [PATCH 04/16] input: tnetv107x-touchscreen: " Jamie Iles
2011-01-12 5:56 ` Dmitry Torokhov
2011-01-18 4:25 ` Dmitry Torokhov
2011-01-18 4:35 ` Dmitry Torokhov
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).