Paul, On Wed, Mar 11, 2015 at 4:18 PM, Paul Bolle <pebolle@xxxxxxxxxx> 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 devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html