[PATCH 3/4] ARM: smp_twd: get the rate from a clock

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Dec 12 08:46:15 EST 2011


On Mon, Dec 12, 2011 at 10:57:27AM +0100, Linus Walleij wrote:
> +static struct clk *twd_get_clock(void)
> +{
> +	struct clk *clk;
> +	int err;
> +
> +	clk = clk_get_sys("smp_twd", NULL);
> +	if (IS_ERR(clk)) {
> +		pr_err("smp_twd: clock not found: %d\n", (int)PTR_ERR(clk));
> +		return clk;
> +	}
> +
> +	err = clk_enable(clk);
> +	if (err) {
> +		pr_err("smp_twd: clock failed to enable: %d\n", err);
> +		clk_put(clk);
> +		return ERR_PTR(err);
> +	}

NAK.  No clk_prepare().



More information about the linux-arm-kernel mailing list