Messages in this thread | | | Date | Thu, 12 Jul 2012 10:02:13 +0100 | From | Alan Cox <> | Subject | Re: [PATCH 00/30] staging: comedi: move 'struct pci_dev *' into comedi_device |
| |
> I suppose at a later date we could turn that into a union with a short > name like u (so comedidev->pcidev would become something like > comedidev->u.pcidev), which would allow us to stick a 'struct > usb_interface *' or some other hardware device wrapper struct pointer in > the same hole. (Maybe 'h' for 'hardware' would be better than 'u'.)
The "usual" pattern is to make it a struct device pointer. Then you can get to any other kind of device from it.
Alan
| |