Commit ddb01367 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: comedidev.h: introduce comedi_to_pci_dev() helper

Introduce a wrapper for to_pci_dev() to allow the comedi_pci_drivers
to store the pci_dev pointer in the comedi_device hw_dev variable and
retrieve it easily.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbot <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 289a6429
......@@ -446,6 +446,11 @@ static inline void comedi_set_hw_dev(struct comedi_device *dev,
}
}
static inline struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev)
{
return dev->hw_dev ? to_pci_dev(dev->hw_dev) : NULL;
}
int comedi_buf_put(struct comedi_async *async, short x);
int comedi_buf_get(struct comedi_async *async, short *x);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment