* [PATCH 12/16] mtd: mpc5121_nfc: 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 15:15 ` Wolfram Sang
2011-01-18 12:09 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Jamie Iles @ 2011-01-11 12:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Jamie Iles, Vincent Sanders, linux-mtd
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: Vincent Sanders <support@simtec.co.uk>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
drivers/mtd/nand/mpc5121_nfc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index 469e649..ddaf001 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -29,6 +29,7 @@
#include <linux/clk.h>
#include <linux/gfp.h>
#include <linux/delay.h>
+#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
@@ -758,9 +759,9 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op,
/* Enable NFC clock */
prv->clk = clk_get(dev, "nfc_clk");
- if (!prv->clk) {
+ if (IS_ERR(prv->clk)) {
dev_err(dev, "Unable to acquire NFC clock!\n");
- retval = -ENODEV;
+ retval = PTR_ERR(prv->clk);
goto error;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 12/16] mtd: mpc5121_nfc: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 12/16] mtd: mpc5121_nfc: don't treat NULL clk as an error Jamie Iles
@ 2011-01-11 15:15 ` Wolfram Sang
2011-01-18 12:09 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2011-01-11 15:15 UTC (permalink / raw)
To: Jamie Iles; +Cc: Vincent Sanders, linux-mtd, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
On Tue, Jan 11, 2011 at 12:43:49PM +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: Vincent Sanders <support@simtec.co.uk>
> Cc: linux-mtd@lists.infradead.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 12/16] mtd: mpc5121_nfc: don't treat NULL clk as an error
2011-01-11 12:43 ` [PATCH 12/16] mtd: mpc5121_nfc: don't treat NULL clk as an error Jamie Iles
2011-01-11 15:15 ` Wolfram Sang
@ 2011-01-18 12:09 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2011-01-18 12:09 UTC (permalink / raw)
To: Jamie Iles; +Cc: Vincent Sanders, linux-mtd, linux-kernel
On Tue, 2011-01-11 at 12:43 +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: Vincent Sanders <support@simtec.co.uk>
> Cc: linux-mtd@lists.infradead.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Pushed to l2-mtd-2.6.git, thanks.
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-18 12:09 UTC | newest]
Thread overview: 3+ 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 12/16] mtd: mpc5121_nfc: don't treat NULL clk as an error Jamie Iles
2011-01-11 15:15 ` Wolfram Sang
2011-01-18 12:09 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox