From: Moritz Fischer <moritz.fischer@ettus.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Sebastian Reichel <sre@kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] power: reset: Add generic SYSCON register mapped poweroff.
Date: Wed, 11 Mar 2015 17:52:00 -0700 [thread overview]
Message-ID: <CAAtXAHd_imahuXFnGJY7JwpN+zRFG_pvGQbPN+O_u1VAruk8ug@mail.gmail.com> (raw)
In-Reply-To: <1426115936.4244.132.camel@x220>
Paul,
On Wed, Mar 11, 2015 at 4:18 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
> MODULE_DEVICE_TABLE() is defined only in include/linux/module.h. The few
> related lines read (in next-20150311):
> #ifdef MODULE
> /* Creates an alias so file2alias.c can find device table. */
> #define MODULE_DEVICE_TABLE(type, name) \
> extern const typeof(name) __mod_##type##__##name##_device_table \
> __attribute__ ((unused, alias(__stringify(name))))
> #else /* !MODULE */
> #define MODULE_DEVICE_TABLE(type, name)
> #endif
>
> So I think MODULE_DEVICE_TABLE() is always preprocessed away for boolean
> code. Did I get that right?
Yeah, looking at that convinced me :) I have it already removed in v2.
>
>> >> +module_platform_driver(syscon_poweroff_driver);
>> >
>> > I think the built-in equivalent of this would be adding a wrapper that
>> > only does
>> > platform_driver_register(&syscon_poweroff_driver);
>>
>> I couldn't find other examples in the tree doing this. Any pointers?
>
> Please note "think". But see drivers/cpufreq/dbx500-cpufreq.c:
> static int __init dbx500_cpufreq_register(void)
> {
> return platform_driver_register(&dbx500_cpufreq_plat_driver);
> }
> device_initcall(dbx500_cpufreq_register);
>
> or drivers/gpio/gpio-vf610.c:
> static int __init gpio_vf610_init(void)
> {
> return platform_driver_register(&vf610_gpio_driver);
> }
> device_initcall(gpio_vf610_init);
I included it into v3. Thanks.
Thanks again for your feedback,
Moritz
next prev parent reply other threads:[~2015-03-12 0:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 23:21 [PATCH 0/2] Add support for generic register mapped poweroff Moritz Fischer
[not found] ` <1426029670-31775-1-git-send-email-moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
2015-03-10 23:21 ` [PATCH 1/2] power: reset: Add generic SYSCON " Moritz Fischer
2015-03-11 1:39 ` Sebastian Reichel
2015-03-11 9:31 ` Paul Bolle
2015-03-11 22:00 ` Moritz Fischer
2015-03-11 23:18 ` Paul Bolle
2015-03-12 0:52 ` Moritz Fischer [this message]
2015-03-10 23:21 ` [PATCH 2/2] dt: power: Add docs for generic SYSCON poweroff driver Moritz Fischer
2015-03-10 23:23 ` Moritz Fischer
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=CAAtXAHd_imahuXFnGJY7JwpN+zRFG_pvGQbPN+O_u1VAruk8ug@mail.gmail.com \
--to=moritz.fischer@ettus.com \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=sre@kernel.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;
as well as URLs for NNTP newsgroup(s).