From: joshc@linux.com (Josh Cartwright)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] pinmux: add a driver for the U300 pinmux
Date: Tue, 10 May 2011 21:47:09 -0500 [thread overview]
Message-ID: <20110511024709.GA16868@kryptos.austin.rr.com> (raw)
In-Reply-To: <1304363798-30409-1-git-send-email-linus.walleij@stericsson.com>
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
next prev parent reply other threads:[~2011-05-11 2:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 19:16 [PATCH 2/4] pinmux: add a driver for the U300 pinmux Linus Walleij
2011-05-02 19:40 ` Joe Perches
2011-05-11 0:17 ` Linus Walleij
2011-05-11 0:28 ` Joe Perches
2011-05-11 2:47 ` Josh Cartwright [this message]
2011-05-15 23:56 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110511024709.GA16868@kryptos.austin.rr.com \
--to=joshc@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox