From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Benoit Thebaudeau <benoit.thebaudeau@advansee.com>,
David Hardeman <david@hardeman.nu>,
Trilok Soni <tsoni@codeaurora.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Matus Ujhelyi <ujhelyi.m@gmail.com>,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v2] media: rc: gpio-ir-recv: add support for device tree parsing
Date: Fri, 08 Feb 2013 22:52:32 +0100 [thread overview]
Message-ID: <511573A0.1030502@gmail.com> (raw)
In-Reply-To: <51156FCB.6020401@gmail.com>
On 02/08/2013 10:36 PM, Sebastian Hesselbarth wrote:
>> You could also make it:
>>
>> #define gpio_ir_recv_get_devtree_pdata (-ENOSYS)
>
> Hmm, does that also play with parameter passing of the
> CONFIG_OF gpio_ir_recv_get_devtree_pdata() ?
Oops, should have been:
#define gpio_ir_recv_get_devtree_pdata(dev, pd) (-ENOSYS)
>> #define gpio_ir_recv_get_devtree_pdata (-ENOSYS)
>>> +{
>>> + return ERR_PTR(-ENODEV);
>>> +}
>>> +
>>> +#endif
>>> +
>>> static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
>>> {
>>> struct gpio_rc_dev *gpio_dev = dev_id;
>>> @@ -66,6 +111,17 @@ static int gpio_ir_recv_probe(struct
>>> platform_device *pdev)
>>> pdev->dev.platform_data;
>>> int rc;
>>>
>>> + if (pdev->dev.of_node) {
>>> + struct gpio_ir_recv_platform_data *dtpdata =
>>
>> I think you could use pdata here instead, as previously. But I'm fine
>> with
>> as it is now as well.
>
> Yeah, but pdata is const and I will change it within _get_devtree_pdata().
> I could cast the const away when passing it to
> gpio_ir_recv_get_devtree_pdata()
> but it is almost the same amount of code.. and it is cleaner this way.
True, let's leave it intact then.
S.
next prev parent reply other threads:[~2013-02-08 21:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 19:07 [PATCH] media: rc: gpio-ir-recv: add support for device tree parsing Sebastian Hesselbarth
2013-02-06 8:03 ` [PATCH RESEND] " Sebastian Hesselbarth
2013-02-06 13:48 ` Sylwester Nawrocki
2013-02-06 17:18 ` Sebastian Hesselbarth
2013-02-08 17:57 ` Mauro Carvalho Chehab
2013-02-08 18:12 ` Sebastian Hesselbarth
2013-02-08 19:06 ` Mauro Carvalho Chehab
2013-02-08 19:03 ` Sylwester Nawrocki
2013-02-08 20:38 ` [PATCH v2] " Sebastian Hesselbarth
2013-02-08 21:26 ` Sylwester Nawrocki
2013-02-08 21:36 ` Sebastian Hesselbarth
2013-02-08 21:52 ` Sylwester Nawrocki [this message]
2013-02-08 22:47 ` [PATCH v3] " Sebastian Hesselbarth
2013-02-09 0:03 ` [PATCH v2] " Mauro Carvalho Chehab
2013-02-09 0:45 ` Sebastian Hesselbarth
2013-02-09 13:41 ` Mauro Carvalho Chehab
2013-02-09 17:05 ` Sylwester Nawrocki
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=511573A0.1030502@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=benoit.thebaudeau@advansee.com \
--cc=david@hardeman.nu \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=s.nawrocki@samsung.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tsoni@codeaurora.org \
--cc=ujhelyi.m@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).