From: John Crispin <john@phrozen.org>
To: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/5] MIPS: pci-ar724x: convert into a platform driver
Date: Sat, 02 Feb 2013 15:17:54 +0100 [thread overview]
Message-ID: <510D2012.8070408@phrozen.org> (raw)
In-Reply-To: <1359808846-23083-1-git-send-email-juhosg@openwrt.org>
On 02/02/13 13:40, Gabor Juhos wrote:
> +static int ar724x_pci_probe(struct platform_device *pdev)
> +{
> + struct resource *res;
> + int irq;
> +
> + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl_base");
> + if (!res)
> + return -EINVAL;
> +
> + ar724x_pci_ctrl_base = devm_request_and_ioremap(&pdev->dev, res);
> + if (ar724x_pci_ctrl_base == NULL)
> + return -EBUSY;
> +
> + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base");
> + if (!res)
> + return -EINVAL;
Hi,
maybe better use platform_get_resource(pdev, IORESOURCE_MEM, 0/1) ...
you will otherwise have to patch this again when you convert to OF
John
next prev parent reply other threads:[~2013-02-02 14:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 12:40 [PATCH 1/5] MIPS: pci-ar724x: convert into a platform driver Gabor Juhos
2013-02-02 12:40 ` [PATCH 2/5] MIPS: pci-ar71xx: " Gabor Juhos
2013-02-02 12:44 ` [PATCH 3/5] MIPS: ath79: move global PCI defines into a common header Gabor Juhos
2013-02-02 12:44 ` [PATCH 4/5] MIPS: ath79: register platform devices for the PCI controllers Gabor Juhos
2013-02-02 12:45 ` [PATCH 5/5] MIPS: ath79: remove unused ar7{1x,24}x_pcibios_init functions Gabor Juhos
2013-02-02 14:17 ` John Crispin [this message]
2013-02-02 14:27 ` [PATCH 1/5] MIPS: pci-ar724x: convert into a platform driver Gabor Juhos
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=510D2012.8070408@phrozen.org \
--to=john@phrozen.org \
--cc=linux-mips@linux-mips.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