linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: socfpga: Remove check for "reg" property in socfpga_clk_init
@ 2013-10-15  0:34 dinguyen at altera.com
  2013-10-22 10:45 ` Dinh Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: dinguyen at altera.com @ 2013-10-15  0:34 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dinh Nguyen <dinguyen@altera.com>

The function socfpga_clk_init() can support clocks that do not have a divider
register, but a fixed-divider that can be read from DTS. Therefore, the "reg"
property is not a failing condition for socfpga_clk_init().

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
---
 drivers/clk/socfpga/clk.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
index 5bb848c..7f846bf 100644
--- a/drivers/clk/socfpga/clk.c
+++ b/drivers/clk/socfpga/clk.c
@@ -121,9 +121,7 @@ static __init struct clk *socfpga_clk_init(struct device_node *node,
 	int rc;
 	u32 fixed_div;
 
-	rc = of_property_read_u32(node, "reg", &reg);
-	if (WARN_ON(rc))
-		return NULL;
+	of_property_read_u32(node, "reg", &reg);
 
 	socfpga_clk = kzalloc(sizeof(*socfpga_clk), GFP_KERNEL);
 	if (WARN_ON(!socfpga_clk))
-- 
1.7.9.5

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

* [PATCH] clk: socfpga: Remove check for "reg" property in socfpga_clk_init
  2013-10-15  0:34 [PATCH] clk: socfpga: Remove check for "reg" property in socfpga_clk_init dinguyen at altera.com
@ 2013-10-22 10:45 ` Dinh Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Dinh Nguyen @ 2013-10-22 10:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

On 10/14/13 7:34 PM, dinguyen at altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
>
> The function socfpga_clk_init() can support clocks that do not have a divider
> register, but a fixed-divider that can be read from DTS. Therefore, the "reg"
> property is not a failing condition for socfpga_clk_init().
>
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: linux-arm-kernel at lists.infradead.org
> ---
>   drivers/clk/socfpga/clk.c |    4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
> index 5bb848c..7f846bf 100644
> --- a/drivers/clk/socfpga/clk.c
> +++ b/drivers/clk/socfpga/clk.c
> @@ -121,9 +121,7 @@ static __init struct clk *socfpga_clk_init(struct device_node *node,
>   	int rc;
>   	u32 fixed_div;
>   
> -	rc = of_property_read_u32(node, "reg", &reg);
> -	if (WARN_ON(rc))
> -		return NULL;
> +	of_property_read_u32(node, "reg", &reg);
>   
>   	socfpga_clk = kzalloc(sizeof(*socfpga_clk), GFP_KERNEL);
>   	if (WARN_ON(!socfpga_clk))
Was wondering if you have gotten a chance to review this patch?

Thanks,
Dinh

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

end of thread, other threads:[~2013-10-22 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15  0:34 [PATCH] clk: socfpga: Remove check for "reg" property in socfpga_clk_init dinguyen at altera.com
2013-10-22 10:45 ` Dinh Nguyen

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).