Messages in this thread | | | Subject | Re: [parisc-linux] Untested port of parisc_device to generic device interface | From | Marc Zyngier <> | Date | 13 Nov 2002 13:36:14 +0100 |
| |
>>>>> "Ivan" == Ivan Kokshaysky <ink@jurassic.park.msu.ru> writes:
Ivan> It seems that two things are fundamentally missing in generic Ivan> device model: Ivan> 1. clean way to detect the type of container structure from arbitrary Ivan> struct device *;
Indeed.
I'm using the following stuff in some EISA drivers :
#ifdef CONFIG_EISA #define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL) #else #define DEVICE_EISA(dev) NULL #endif
and frankly, it's really awful. On drivers which are both EISA and PCI (3c59x, aic7xxx), this is a major pain.
M. -- Places change, faces change. Life is so very strange. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |