Re: [PATCH] Add device addition/removal notifier

From: Paul Mackerras
Date: Fri Oct 20 2006 - 06:09:09 EST


Greg KH writes:

> Remember, we didn't add a type identifier to the struct device for a
> reason, comparing the string of the bus type is not a good idea (for
> USB, it will get you in trouble, because two different types of devices
> can be on that bus, who's to say other busses will not also have that
> issue?)

But then we added the dma_map_* API, which only gets the struct device
pointer but needs to do something different depending on what type of
bus the device is on, and possibly even depending on which instance of
its bus type it's on...

If we are going to have APIs like this that work on a struct device,
then we need to have some good way to know what type of bus the device
is on, and what code we need to call to manipulate that bus type.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/