On Tue, Mar 11, 2014 at 04:48:42PM +0000, Hartley Sweeten wrote:
> On Tuesday, March 11, 2014 4:18 AM, Ian Abbott wrote:
> > On 2014-03-07 20:41, H Hartley Sweeten wrote:
> >> Create an enum for the boards supported by this driver and pass that enum 
> >> in
> >> the pci_driver id_table as the driver_data.
> >>
> >> Introduce a boardinfo struct to hold the board specific data for the boards
> >> supported by this driver. Use the boardinfo when attaching to the driver
> >> instead of using the pcidev->device and the switch.
> >>
> >> Since the PCI device ids are now only used in the id_table, remove the
> >> defines and open code the device ids.
> >>
> >> Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
> >> Cc: Ian Abbott <abbo...@mev.co.uk>
> >> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> >> ---
> >>   drivers/staging/comedi/drivers/jr3_pci.c | 77 
> >> +++++++++++++++++++-------------
> >>   1 file changed, 46 insertions(+), 31 deletions(-)
> >>
> >> diff --git a/drivers/staging/comedi/drivers/jr3_pci.c 
> >> b/drivers/staging/comedi/drivers/jr3_pci.c
> >> index f80bfcb..904104e 100644
> >> --- a/drivers/staging/comedi/drivers/jr3_pci.c
> >> +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> > [snip]
> >> @@ -798,11 +813,11 @@ static int jr3_pci_pci_probe(struct pci_dev *dev,
> >>   }
> >>
> >>   static const struct pci_device_id jr3_pci_pci_table[] = {
> >> -  { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_1_CHANNEL) },
> >> -  { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_1_CHANNEL_NEW) },
> >> -  { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_2_CHANNEL) },
> >> -  { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_3_CHANNEL) },
> >> -  { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_4_CHANNEL) },
> >> +  { PCI_DEVICE(PCI_VENDOR_ID_JR3, 0x1111), BOARD_JR3_1 },
> >> +  { PCI_DEVICE(PCI_VENDOR_ID_JR3, 0x3111), BOARD_JR3_1 },
> >> +  { PCI_DEVICE(PCI_VENDOR_ID_JR3, 0x3112), BOARD_JR3_2 },
> >> +  { PCI_DEVICE(PCI_VENDOR_ID_JR3, 0x3113), BOARD_JR3_3 },
> >> +  { PCI_DEVICE(PCI_VENDOR_ID_JR3, 0x3114), BOARD_JR3_4 },
> >
> > That's initializing the `class` member instead of the `driver_data` 
> > member.  You can use `PCI_VDEVICE(JR3, 0x1111, BOARD_JR3_1)`, etc. to 
> > fix it.
> 
> Ugh.. My bad.
> 
> Greg,
> 
> Do you just want a v2 of this patch or should I repost all 14?

v2 of just this one is fine.
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to