From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Dongjin Kim <tobetter@gmail.com>
Cc: linux-samsung-soc@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] USB: ehci-s5p: Add to get interrupt from DT
Date: Wed, 26 Dec 2012 23:18:08 +0300 [thread overview]
Message-ID: <50DB5B80.50801@mvista.com> (raw)
In-Reply-To: <1356547341-23620-3-git-send-email-tobetter@gmail.com>
Hello.
On 12/26/2012 09:42 PM, Dongjin Kim wrote:
> This patch support to get interrupt resource from device tree as well as
> platform device if ehci node is defined in device tree and it's irq is
> described.
> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
> ---
> drivers/usb/host/ehci-s5p.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
> diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
> index 319dcfa..0fc5e5e 100644
> --- a/drivers/usb/host/ehci-s5p.c
> +++ b/drivers/usb/host/ehci-s5p.c
> @@ -16,6 +16,7 @@
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/of_gpio.h>
> +#include <linux/of_irq.h>
> #include <linux/platform_data/usb-ehci-s5p.h>
> #include <plat/usb-phy.h>
>
> @@ -156,7 +157,12 @@ static int s5p_ehci_probe(struct platform_device *pdev)
> goto fail_io;
> }
>
> - irq = platform_get_irq(pdev, 0);
> + if (pdev->dev.of_node)
> + irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
platform_get_irq() should still work for device tree based platform devices.
I don't see the point on the patch?
> + else {
> + irq = platform_get_irq(pdev, 0);
> + }
Hm, why {} out of the blue? Both arms of *if* are single-stratement.
> +
No need for empty line here.
> if (!irq) {
> dev_err(&pdev->dev, "Failed to get IRQ\n");
> err = -ENODEV;
WBR, Sergei
next prev parent reply other threads:[~2012-12-26 19:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-26 18:42 [PATCH 0/2] EXYNOS4: Add device tree support for USB/EHCI Dongjin Kim
2012-12-26 18:42 ` [PATCH 1/2] ARM: dts: Add EHCI device tree node for Exynos4 Dongjin Kim
2012-12-26 18:42 ` Dongjin Kim
2012-12-26 18:42 ` [PATCH 2/2] USB: ehci-s5p: Add to get interrupt from DT Dongjin Kim
2012-12-26 20:18 ` Sergei Shtylyov [this message]
[not found] ` <50DB5B80.50801-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2012-12-27 11:58 ` Dongjin Kim
2012-12-27 11:58 ` Dongjin Kim
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=50DB5B80.50801@mvista.com \
--to=sshtylyov@mvista.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tobetter@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.