Thread (22 messages) flat view 22 messages, 6 authors, 2011-09-10

[PATCH v2] ASoC: omap: convert per-board modules to platform drivers

From: arnd@arndb.de (Arnd Bergmann)
Date: 2011-09-08 23:18:50
Also in: alsa-devel, linux-omap, lkml

On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help