Re: [PATCH] staging/xgifb: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)

From: Peter Hüwe
Date: Sun Nov 06 2011 - 17:02:54 EST


Am Sonntag 06 November 2011, 22:37:53 schrieb Aaro Koskinen:
> > - {PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20, PCI_ANY_ID, PCI_ANY_ID,
> > - 0, 0, 0},
> > + {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20), 0, 0, 0},
> I think the correct way would be
>
> {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20), .driver_data = 0},

I was thinking about this, but I guess it's not that better than 0,0,0)

> or
>
> {PCI_VDEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20), 0},

Greg hates this macro, that's why I did not use this ;)
He once wrote:
GKH> The main reason I hate this [PCI_VDEVICE] macro, is that it now makes it
GKH> almost impossible to grep for any users of the PCI_VENDOR_DIGI pci
GKH> vendor id. I much prefer the PCI_DEVICE() macro instead, and as such, I'm
GKH> not willing to take any of these patches, sorry.

> But I don't see the driver_data even being used anywhere, so then you
> could
> just simply say:
>
> {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20)},

Good catch, it seems so, so I'll create a v2

Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/