On Fri, Nov 09, 2012 at 04:43:27PM +0000, Grant Likely wrote:

> In the short term, yes but only because we don't have any other
> alternative. What I'd really rather have is a safe way to attach datum
> (ie. acpi_device or device_node) to a struct device and get it back
> later in a type safe way. It would actually be useful for all manner
> of things, not just ACPI/DT. I experimented a bit with trying to
> implement something a year back, but never spent enough time on it.

devres might already do what you need here if you are OK with the
performance (and frees things too for super bonus fun points!).  That's
how dev_get_regmap() is implemented, it's not awesome in a fast path but
it seems OK otherwise.

Attachment: signature.asc
Description: Digital signature

Reply via email to