[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110511024709.GA16868@kryptos.austin.rr.com>
Date: Tue, 10 May 2011 21:47:09 -0500
From: Josh Cartwright <joshc@...ux.com>
To: Linus Walleij <linus.walleij@...ricsson.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Grant Likely <grant.likely@...retlab.ca>,
Lee Jones <lee.jones@...aro.org>,
Martin Persson <martin.persson@...ricsson.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 2/4] pinmux: add a driver for the U300 pinmux
On Mon, May 02, 2011 at 09:16:38PM +0200, Linus Walleij wrote:
[]
> +
> +static int __init u300_pmx_probe(struct platform_device *pdev)
> +{
[]
> + upmx->phybase = res->start;
> + upmx->physize = resource_size(res);
> +
> + if (request_mem_region(upmx->phybase, upmx->physize,
> + DRIVER_NAME) == NULL) {
> + ret = -EBUSY;
> + goto out_no_memregion;
> + }
> +
> + upmx->virtbase = ioremap(upmx->phybase, upmx->physize);
> + if (!upmx->virtbase) {
> + ret = -ENOMEM;
> + goto out_no_remap;
> + }
> +
> + upmx->pmx = pinmux_register(&u300_pmx_desc, &pdev->dev, upmx);
> + if (IS_ERR(upmx->pmx)) {
> + ret = PTR_ERR(upmx->pmx);
> + goto out_no_pmx;
> + }
> + platform_set_drvdata(pdev, upmx);
> +
> + dev_info(&pdev->dev, "initialized U300 pinmux driver\n");
> +
> + return 0;
> +
> +out_no_pmx:
> + iounmap(upmx->virtbase);
> +out_no_remap:
> + platform_set_drvdata(pdev, NULL);
> +out_no_memregion:
> + release_mem_region(upmx->phybase, SZ_4K);
release_mem_region(upmx->phybase, upmx->physize); ?
--
joshc
--
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