linux-2.5.46/include/linux/kernel.h already defines
container_of(ptr_to_element, parent_struct, element_name).
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
#define to_usb_device(d) container_of(d, struct usb_device, dev)
static inline struct parisc_device *to_parisc_dev(struct device *dev)
{
return container_of(dev, struct parisc_device, device);
}
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Miplitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
-
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/