[alsa-devel] [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Apr 28 14:19:19 EST 2010
On Tue, 2010-04-27 at 15:04 -0500, Timur Tabi wrote:
> What I need is something like a hashing function that can convert a
> "struct device_node *" into an "int". I'm going to have two functions
> that independently parse the device tree and locate a specific node.
> Both functions will "register the node" with asoc, but they'll use an
> integer ID to uniquely identify the node.
>
> At least, that's the way ASoC likes to operate. AsoC takes a fixed
> string plus a unique integer. I could technically create a unique
> string for each DMA device, and have the integer always be 0.
That's just plain gross and horrible. You could use phandles you
know :-)
Or you could use path in your strings, or something like that.
Note that any time you have a struct device, you have a free device_node
pointer as well.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list