diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 2b884a6e0287..4ac2de43cdbb 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -41,6 +41,7 @@ #include #include #include +#include #include "comedi.h" @@ -193,8 +194,6 @@ struct comedi_async { unsigned int x); }; -struct usb_interface; - struct comedi_driver { struct comedi_driver *next; @@ -457,6 +456,12 @@ static inline struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev) return dev->hw_dev ? to_pci_dev(dev->hw_dev) : NULL; } +static inline struct usb_interface * +comedi_to_usb_interface(struct comedi_device *dev) +{ + return dev->hw_dev ? to_usb_interface(dev->hw_dev) : NULL; +} + int comedi_buf_put(struct comedi_async *async, short x); int comedi_buf_get(struct comedi_async *async, short *x);