From: Samuel Ortiz <sameo@openedhand.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>,
linux-arm-kernel@lists.arm.linux.org.uk,
linux-omap@vger.kernel.org,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH 1/2] ARM: OMAP: Fix missing includes
Date: Sat, 10 Jan 2009 18:40:34 +0100 [thread overview]
Message-ID: <20090110174033.GB2601@sortiz.org> (raw)
In-Reply-To: <20090110162048.GA1327@n2100.arm.linux.org.uk>
On Sat, Jan 10, 2009 at 04:20:48PM +0000, Russell King - ARM Linux wrote:
> On Sat, Jan 10, 2009 at 04:56:12PM +0100, Samuel Ortiz wrote:
> > Hi Tony,
> >
> > On Wed, Jan 07, 2009 at 01:16:15PM +0200, Tony Lindgren wrote:
> > > diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c
> > > index b59c385..18179ac 100644
> > > --- a/drivers/mfd/twl4030-core.c
> > > +++ b/drivers/mfd/twl4030-core.c
> > > @@ -38,6 +38,7 @@
> > > #include <linux/i2c.h>
> > > #include <linux/i2c/twl4030.h>
> > >
> > > +#include <mach/cpu.h>
> > That will break the build on !ARM for this driver.
>
> ... which in itself is an argument for making it use the clk API
> properly so that these kinds of CPU specific dependencies are kept
> out of the driver.
I agree.
Until that gets done, if we really need to include a header file to fix this
build, I would rather go for a generic one, <linux/io.h> for example.
Cheers,
Samuel.
> In other words:
>
> if (cpu_is_omap2430())
> osc = clk_get(NULL, "osc_ck");
> else
> osc = clk_get(NULL, "osc_sys_ck");
>
> becomes:
>
> osc = clk_get(dev, "hfclk");
>
> since "hfclk" is the name of the input on the device, or it should be
> NULL if it is the only input on the device (iow, you don't want to
> distinguish it from the 32kHz clock.)
>
> And that eliminates the need for any platform specific includes (which
> is the whole point of the clk API - giving drivers a _generic_ way to
> get at clock information without resorting to platform specific crap.)
--
Intel Open Source Technology Centre
http://oss.intel.com/
next prev parent reply other threads:[~2009-01-10 17:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 11:14 [PATCH 0/2] Fix omap builds Tony Lindgren
2009-01-07 11:16 ` [PATCH 1/2] ARM: OMAP: Fix missing includes Tony Lindgren
2009-01-07 11:17 ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls Tony Lindgren
2009-01-07 11:37 ` Jarkko Nikula
2009-01-07 12:03 ` Tony Lindgren
2009-01-07 13:26 ` Adrian Hunter
2009-01-07 13:18 ` Tony Lindgren
2009-01-07 16:18 ` Russell King - ARM Linux
2009-01-07 17:50 ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls, v2 Tony Lindgren
2009-01-07 22:00 ` Russell King - ARM Linux
2009-01-08 7:36 ` updated git pull request for omap compile fixes, mailbox and hsmmc Tony Lindgren
2009-01-10 11:05 ` Russell King - ARM Linux
2009-01-11 10:14 ` Russell King - ARM Linux
2009-01-12 6:24 ` Tony Lindgren
2009-01-12 16:43 ` Russell King - ARM Linux
2009-01-13 10:30 ` Tony Lindgren
2009-01-19 16:36 ` Russell King - ARM Linux
2009-01-23 0:45 ` Tony Lindgren
2009-01-12 6:28 ` Tony Lindgren
2009-01-10 11:02 ` [PATCH 2/2] ARM: OMAP: Fix gpio by switching to generic gpio calls Russell King - ARM Linux
2009-01-12 13:14 ` Tony Lindgren
2009-01-10 10:57 ` [PATCH 1/2] ARM: OMAP: Fix missing includes Russell King - ARM Linux
2009-01-10 15:56 ` Samuel Ortiz
2009-01-10 16:20 ` Russell King - ARM Linux
2009-01-10 17:40 ` Samuel Ortiz [this message]
2009-01-10 17:56 ` Russell King - ARM Linux
2009-01-12 6:45 ` Tony Lindgren
2009-01-10 21:21 ` David Brownell
2009-01-10 20:49 ` David Brownell
2009-01-11 0:01 ` Samuel Ortiz
2009-01-12 6:31 ` Tony Lindgren
2009-01-07 11:25 ` git pull request for omap compile fixes, mailbox and hsmmc for current merge window Tony Lindgren
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=20090110174033.GB2601@sortiz.org \
--to=sameo@openedhand.com \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.