From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@suse.de>
Cc: "Par-Gunnar HJALMDAHL" <par-gunnar.p.hjalmdahl@stericsson.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Pavan Savoy <pavan_savoy@sify.com>,
Vitaly Wool <vitalywool@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcel Holtmann <marcel@holtmann.org>,
Lukasz Rymanowski <Lukasz.Rymanowski@tieto.com>,
Linus WALLEIJ <linus.walleij@stericsson.com>,
"Par-Gunnar Hjalmdahl" <pghatwork@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH v2 2/2] mach-ux500: Add CG2900 devices
Date: Mon, 28 Mar 2011 16:59:45 +0200 [thread overview]
Message-ID: <201103281659.45929.arnd@arndb.de> (raw)
In-Reply-To: <20110328143955.GB23892@suse.de>
On Monday 28 March 2011, Greg KH wrote:
> >
> > But how should I then do this? As I understood it I was told that I should
> > call an init function, but I was not allowed to add any staging folder
> > inclusion in the board config makefile. And now I can't do any extern
> > declaration either. I don't really see how I could do it then.
>
> Why can't you add a staging folder inclusion? You could do that, and
> properly set up your .h file so that if the driver is not built, your
> code still properly builds and runs.
That would work as well, along with the two solutions I suggested.
I believe Pär-Gunnar was trying to avoid #ifdefs, and the patch actually
contains alternative files implementing cg2900_init_board as a stub
when CONFIG_CG2900 is set, so the intent was clearly there:
@@ -0,0 +1,18 @@
+#
+# Makefile for ST-Ericsson CG2900 connectivity combo controller
+#
+
+ccflags-y := \
+ -Idrivers/staging/cg2900/include \
+ -Iarch/arm/mach-ux500
+
+ifeq ($(CONFIG_CG2900),n)
+obj-y += board-mop500-nocg2900.o
+export-objs := board-mop500-nocg2900.o
+else
+obj-$(CONFIG_CG2900) += board-mop500-cg2900.o devices-cg2900.o
+export-objs := board-mop500-cg2900.o
+endif
+
I don't think that this works though, because the directory
is ignored when CONFIG_CG2900 is not set, and if it did work,
it would cause an empty function to be included in every
single kernel, not even limited to the ARM architecture.
Arnd
next prev parent reply other threads:[~2011-03-28 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 9:03 [PATCH v2 2/2] mach-ux500: Add CG2900 devices Par-Gunnar Hjalmdahl
2011-03-28 13:00 ` Arnd Bergmann
2011-03-28 14:12 ` Greg KH
2011-03-28 14:29 ` Par-Gunnar HJALMDAHL
2011-03-28 14:39 ` Greg KH
2011-03-28 14:59 ` Arnd Bergmann [this message]
2011-03-28 14:47 ` Arnd Bergmann
2011-03-28 14:40 ` Vitaly Wool
2011-03-28 14:49 ` Arnd Bergmann
2011-03-29 6:20 ` Par-Gunnar HJALMDAHL
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=201103281659.45929.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Lukasz.Rymanowski@tieto.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mathieu.poirier@linaro.org \
--cc=par-gunnar.p.hjalmdahl@stericsson.com \
--cc=pavan_savoy@sify.com \
--cc=pghatwork@gmail.com \
--cc=vitalywool@gmail.com \
/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