[PATCH 5/6] ARM: mxc: add dt support for audmux-v2
Richard Zhao
richard.zhao at freescale.com
Fri Jan 6 04:14:50 EST 2012
On Fri, Jan 06, 2012 at 08:56:17AM +0000, Russell King - ARM Linux wrote:
> On Fri, Jan 06, 2012 at 11:25:42AM +0800, Richard Zhao wrote:
> > +#ifdef CONFIG_OF
> > +
> > +static int audmux_v2_probe(struct platform_device *pdev)
> > +{
> > + struct resource *res;
> > + int ret = 0;
> > +
> > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > + if (!res)
> > + return -ENODEV;
> > + if (!request_mem_region(res->start, resource_size(res), "audmux_v2")) {
> > + dev_err(&pdev->dev, "request_mem_region failed\n");
> > + return -EBUSY;
> > + }
> > +
> > + audmux_base = ioremap(res->start, resource_size(res));
> > + if (!audmux_base) {
> > + dev_err(&pdev->dev, "ioremap failed\n");
> > + ret = -ENODEV;
> > + goto failed_ioremap;
> > + }
> > +
> > + audmux_clk = clk_get(NULL, "audmux");
>
> NAK. You have a struct device. Use it.
Right, Thanks.
Richard
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
More information about the linux-arm-kernel
mailing list