[alsa-devel] [PATCH] Improved support for different bt87x board configurations
Clemens Ladisch
cladisch at fastmail.net
Mon Sep 3 08:36:47 CEST 2007
Trent Piepho wrote:
> On Thu, 30 Aug 2007, Takashi Iwai wrote:
> > > - BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000),
> > > + BT_DEVICE(_878, 0x0070, 0x13eb, SND_BT87X_BOARD_HAUPPAUGE878),
> > > /* Hauppauge WinTV series */
> >
> > The word _878 looks strange. PCI_DEVICE_ID_BROOKTREE_878 is more
> > obvious that it's a macro and the readability isn't so bad.
> > I'd say, let it be.
>
> The only problem is that PCI_DEVICE_ID_BROOKTREE_878 is so long that the
> lines become longer than 80 columns. They have to be wrapped, so it's no
> longer one line, one card and less readable. It's also easier to miss that
> one line says PCI_DEVICE_ID_BROOKTREE_879, when you have such a long string
> repeated many times, with only one digit different.
>
> What if I used "BROOKTREE_878" or some suffix of that?
My earlier version of the driver that did use "BT_DEVICE(878, ...)" was
changed to use PCI_DEVICE_ID_BROOKTREE_878 because only the complete
symbol allows to search for PCI IDs with grep.
You could drop the SND_BT87X_ prefix from the board symbols.
The 80 column limit isn't that hard when exceeding it really improves
readability.
Regards,
Clemens
More information about the Alsa-devel
mailing list