Re: [PATCH 04/16] Fix [Bug 5895] to correct snd_87x autodetect

From: Edgar Toernig
Date: Tue Feb 07 2006 - 19:22:39 EST


mchehab@xxxxxxxxxxxxx wrote:
>
> --- a/drivers/media/dvb/bt8xx/bt878.c
> +++ b/drivers/media/dvb/bt8xx/bt878.c
> @@ -381,6 +381,23 @@ bt878_device_control(struct bt878 *bt, u
>
> EXPORT_SYMBOL(bt878_device_control);
>
> +
> +struct cards card_list[] __devinitdata = {
> +
> + { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
> + { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
>[...]

I'm not very familiar with the pci configuration logic but
what's the point of this list and the BTTV_BOARD_xxx defines?
The defines are never used and the list is only used to let
the probe routine fail when the device is not in the list.

Wouldn't it be cleaner to add them to the pci_device_id
list further down instead of requesting all subsystem ids?

| static struct pci_device_id bt878_pci_tbl[] __devinitdata = {
| {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BROOKTREE_878,
| PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
| {0,}
| };


Anyway, the bttv driver already has this information in his card
list (field has_dvb). As long as the bt878 isn't stand alone
and requires the bttv driver wouldn't it be better to query its
table?


Even if this table is kept, it should be static and the variable
card_id in the probe routine should be renamed to pci_id as it
does not hold the card_id as defined in struct card but the pci_id.

Ciao, ET.
-
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/