[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3110288.bQbb0H2ME1@wuerfel>
Date: Thu, 08 Sep 2011 22:28:50 +0200
From: Arnd Bergmann <arnd@...db.de>
To: linaro-dev@...ts.linaro.org
Cc: Mans Rullgard <mans.rullgard@...aro.org>,
Jassi Brar <jassisinghbrar@...il.com>,
alsa-devel@...a-project.org, Russell King <linux@....linux.org.uk>,
Tony Lindgren <tony@...mide.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-kernel@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.de>,
Jarkko Nikula <jhnikula@...il.com>, linux-omap@...r.kernel.org,
Liam Girdwood <lrg@...com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers
On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote:
> >
> > Can't we do by having omap_init_audio() in arch/arm/mach-omap2/devices.c
> > generate a platform device of name depending upon machine_is_* ?
>
> I had the same thought, but I couldn't find a suitable string anywhere.
> Are you suggesting an if(machine_is_foo()) cascade in omap_init_audio()?
>
> I'll be the first to agree this patch is not particularly pretty.
My general feeling is that practically every time someone writes
machine_is_*(), they are doing it wrong. There are of course exceptions,
but I would strongly recommend to have the initialization calling up
from the board file into more general functions instead of having all
boards calling the same function which then goes to board specific
code again.
Arnd
--
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