[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAtXAHd_imahuXFnGJY7JwpN+zRFG_pvGQbPN+O_u1VAruk8ug@mail.gmail.com>
Date: Wed, 11 Mar 2015 17:52:00 -0700
From: Moritz Fischer <moritz.fischer@...us.com>
To: Paul Bolle <pebolle@...cali.nl>
Cc: Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] power: reset: Add generic SYSCON register mapped poweroff.
Paul,
On Wed, Mar 11, 2015 at 4:18 PM, Paul Bolle <pebolle@...cali.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists