[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <017601cbb1ff$63e80d00$2bb82700$%kim@samsung.com>
Date: Wed, 12 Jan 2011 11:21:12 +0900
From: Kukjin Kim <kgene.kim@...sung.com>
To: 'Jamie Iles' <jamie@...ieiles.com>, linux-kernel@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Subject: RE: [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an
error
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@...sung.com>
Acked-by: Kukjin Kim <kgene.kim@...sung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@...sung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Cc: linux-arm-kernel@...ts.infradead.org
> Signed-off-by: Jamie Iles <jamie@...ieiles.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists