[lkml]   [2015]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 6/8] pinctrl: cygnus: add gpio/pinconf driver
On Thu, 2015-03-05 at 09:11 +0100, Paul Bolle wrote:
> On Wed, 2015-03-04 at 16:35 -0800, Ray Jui wrote:
> > +MODULE_AUTHOR("Ray Jui <>");
> > +MODULE_DESCRIPTION("Broadcom Cygnus GPIO Driver");
> These three macros will be preprocessed away. (There's also
> MODULE_DEVICE_TABLE. I don't yet know how that is handled in a
> non-modular build, sorry.)

It turns out MODULE_DEVICE_TABLE is _really_ preprocessed away. See
#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)

Did I get that right?

(I knew the other three MODULE_* macros are handled in slightly more
complicated way, but the effect is basically that they are preprocessed

Paul Bolle

 \ /
  Last update: 2015-03-05 09:41    [W:0.219 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site