[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1425544581.24292.194.camel@x220>
Date: Thu, 05 Mar 2015 09:36:21 +0100
From: Paul Bolle <pebolle@...cali.nl>
To: Ray Jui <rjui@...adcom.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Stephen Warren <swarren@...dotorg.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>,
Christian Daudt <bcm@...thebug.org>,
Matt Porter <mporter@...aro.org>,
Florian Fainelli <f.fainelli@...il.com>,
Russell King <linux@....linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Scott Branden <sbranden@...adcom.com>,
Dmitry Torokhov <dtor@...gle.com>,
Anatol Pomazau <anatol@...gle.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-gpio@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
devicetree@...r.kernel.org
Subject: Re: [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 <rjui@...adcom.com>");
> > +MODULE_DESCRIPTION("Broadcom Cygnus GPIO Driver");
> > +MODULE_LICENSE("GPL v2");
>
> 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
include/linux/module.h:
#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
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
away.)
Paul Bolle
--
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