From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>,
Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/3] net: rfkill-gpio: add device tree support
Date: Sun, 5 Feb 2012 20:59:24 +0100 [thread overview]
Message-ID: <20120205195924.GA18267@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <215249735783e9fe35db1c594d901f591725de50.1328461986.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
* Marc Dietrich wrote:
> +#ifdef CONFIG_OF
[...]
> +#else
[...]
> +#define of_rfkill_gpio_match NULL
This can be dropped, see below.
> +#endif
> +
> static int rfkill_gpio_probe(struct platform_device *pdev)
> {
> struct rfkill_gpio_data *rfkill;
> struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data;
> + struct device_node *np = pdev->dev.of_node;
> int ret = 0;
> int len = 0;
>
> + if (np)
> + pdata = rfkill_gpio_parse_pdata(pdev);
> +
> if (!pdata) {
> pr_warn("%s: No platform data specified\n", __func__);
> return -EINVAL;
> @@ -210,13 +268,13 @@ static int rfkill_gpio_remove(struct platform_device *pdev)
>
> return 0;
> }
> -
Are you removing this line on purpose?
> static struct platform_driver rfkill_gpio_driver = {
> .probe = rfkill_gpio_probe,
> .remove = __devexit_p(rfkill_gpio_remove),
> .driver = {
> .name = "rfkill_gpio",
> .owner = THIS_MODULE,
> + .of_match_table = of_rfkill_gpio_match,
I think the canonical way to do this is of_match_ptr() and leave out the
definition to NULL in the !CONFIG_OF above.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Marc Dietrich <marvin24@gmx.de>
Cc: linux-tegra@vger.kernel.org, Stephen Warren <swarren@nvidia.com>,
Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>,
linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
Rhyland Klein <rklein@nvidia.com>
Subject: Re: [PATCH 1/3] net: rfkill-gpio: add device tree support
Date: Sun, 5 Feb 2012 20:59:24 +0100 [thread overview]
Message-ID: <20120205195924.GA18267@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <215249735783e9fe35db1c594d901f591725de50.1328461986.git.marvin24@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
* Marc Dietrich wrote:
> +#ifdef CONFIG_OF
[...]
> +#else
[...]
> +#define of_rfkill_gpio_match NULL
This can be dropped, see below.
> +#endif
> +
> static int rfkill_gpio_probe(struct platform_device *pdev)
> {
> struct rfkill_gpio_data *rfkill;
> struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data;
> + struct device_node *np = pdev->dev.of_node;
> int ret = 0;
> int len = 0;
>
> + if (np)
> + pdata = rfkill_gpio_parse_pdata(pdev);
> +
> if (!pdata) {
> pr_warn("%s: No platform data specified\n", __func__);
> return -EINVAL;
> @@ -210,13 +268,13 @@ static int rfkill_gpio_remove(struct platform_device *pdev)
>
> return 0;
> }
> -
Are you removing this line on purpose?
> static struct platform_driver rfkill_gpio_driver = {
> .probe = rfkill_gpio_probe,
> .remove = __devexit_p(rfkill_gpio_remove),
> .driver = {
> .name = "rfkill_gpio",
> .owner = THIS_MODULE,
> + .of_match_table = of_rfkill_gpio_match,
I think the canonical way to do this is of_match_ptr() and leave out the
definition to NULL in the !CONFIG_OF above.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-02-05 19:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 17:18 [PATCH 1/3] net: rfkill-gpio: add device tree support Marc Dietrich
2012-02-05 17:18 ` Marc Dietrich
[not found] ` <215249735783e9fe35db1c594d901f591725de50.1328461986.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-05 17:18 ` [PATCH 2/3] dt: rfkill-gpio: add bindings documentation Marc Dietrich
2012-02-05 17:18 ` Marc Dietrich
[not found] ` <a2291f385edf9692f4a946fd78a7ee7cca29e3b4.1328461986.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-05 22:00 ` Olof Johansson
2012-02-05 22:00 ` Olof Johansson
[not found] ` <CAOesGMhXZLRHw+TSVqHZFQcYLeu995EKaG_hNFRkgOnPFdmq6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-06 10:16 ` Marc Dietrich
2012-02-06 10:16 ` Marc Dietrich
2012-02-05 17:18 ` [PATCH 3/3] dt: arm: paz00: add rfkill switch to device tree Marc Dietrich
2012-02-05 19:59 ` Thierry Reding [this message]
2012-02-05 19:59 ` [PATCH 1/3] net: rfkill-gpio: add device tree support Thierry Reding
[not found] ` <20120205195924.GA18267-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-02-06 10:25 ` Marc Dietrich
2012-02-06 10:25 ` Marc Dietrich
-- strict thread matches above, loose matches on Subject: below --
2012-02-12 19:13 Marc Dietrich
2012-02-12 19:13 ` Marc Dietrich
[not found] ` <1ec0e63a7453072689618430ebc2bdd7b62542a2.1329073559.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-13 19:25 ` Rhyland Klein
2012-02-13 19:25 ` Rhyland Klein
2012-02-13 19:36 ` Olof Johansson
2012-02-13 19:36 ` Olof Johansson
[not found] ` <CAOesGMgJW7bRZn84VSZNVvc3G6z4S6HPzFEv3MJ8DcNYVsV2uQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-14 10:14 ` Marc Dietrich
2012-02-14 10:14 ` Marc Dietrich
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=20120205195924.GA18267@avionic-0098.adnet.avionic-design.de \
--to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=marvin24-Mmb7MZpHnFY@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 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.