Re: [PATCH 2/7] OMAP: omap_device: Create clkdev entry for hwmod main_clk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 27, 2011 at 06:33:06PM +0200, Benoit Cousson wrote:
...
> +	r = clk_get_sys(dev_name(&od->pdev.dev), clk_alias);
> +	if (!IS_ERR(r)) {
> +		pr_warning("omap_device: %s: %s already exist\n",
> +			   dev_name(&od->pdev.dev), clk_alias);

I believe a clk_put(r) is appropriate here.

> +		return;
> +	}
> +
> +	r = omap_clk_get_by_name(clk_name);
> +	if (IS_ERR(r)) {
> +		pr_err("omap_device: %s: omap_clk_get_by_name for %s failed\n",
> +		       dev_name(&od->pdev.dev), clk_name);
> +		return;
> +	}
> +
> +	l = clkdev_alloc(r, clk_alias, dev_name(&od->pdev.dev));
> +	if (!l) {
> +		pr_err("omap_device: %s: clkdev_alloc for %s failed\n",
> +		       dev_name(&od->pdev.dev), clk_alias);

And here.

> +		return;
> +	}
> +
> +	clkdev_add(l);

And here.


Todd
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux