public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] keyspan: Remove duplicate device entries
@ 2008-06-27  0:08 Ben Collins
  2008-06-27  3:47 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Collins @ 2008-06-27  0:08 UTC (permalink / raw)
  To: gregkh; +Cc: kernel list

The 28xb, as documented in comments, has the same ID's as the 28x.
Remove the duplicated ID's from the device tables, and expand the
comment to document this.

Signed-off-by: Ben Collins <ben.collins@canonical.com>
CC: Greg Kroah-Hartman <greg@kroah.com>

diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h
index 8d6ed02..cc48512 100644
--- a/drivers/usb/serial/keyspan.h
+++ b/drivers/usb/serial/keyspan.h
@@ -222,7 +222,8 @@ struct ezusb_hex_record {
 
 /* Product IDs post-renumeration.  Note that the 28x and 28xb
    have the same id's post-renumeration but behave identically
-   so it's not an issue. */
+   so it's not an issue. As such, the 28xb is not listed in any
+   of the device tables. */
 #define	keyspan_usa18x_product_id		0x0112
 #define	keyspan_usa19_product_id		0x0107
 #define	keyspan_usa19qi_product_id		0x010c
@@ -566,7 +567,6 @@ static struct usb_device_id keyspan_ids_combined[] = {
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
-	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xg_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id)},
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_product_id)},
@@ -616,7 +616,6 @@ static struct usb_device_id keyspan_2port_ids[] = {
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
-	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_product_id) },
 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xg_product_id) },
 	{ } /* Terminating entry */
 };



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] keyspan: Remove duplicate device entries
  2008-06-27  0:08 [PATCH] keyspan: Remove duplicate device entries Ben Collins
@ 2008-06-27  3:47 ` Greg KH
  2008-06-27 14:32   ` Ben Collins
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2008-06-27  3:47 UTC (permalink / raw)
  To: Ben Collins; +Cc: kernel list

On Thu, Jun 26, 2008 at 08:08:16PM -0400, Ben Collins wrote:
> The 28xb, as documented in comments, has the same ID's as the 28x.
> Remove the duplicated ID's from the device tables, and expand the
> comment to document this.

Was this causing a problem somehow?  How did you notice this?  Good
catch.

I'll add it to my queue, thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] keyspan: Remove duplicate device entries
  2008-06-27  3:47 ` Greg KH
@ 2008-06-27 14:32   ` Ben Collins
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Collins @ 2008-06-27 14:32 UTC (permalink / raw)
  To: Greg KH; +Cc: kernel list

On Thu, 2008-06-26 at 20:47 -0700, Greg KH wrote:
> On Thu, Jun 26, 2008 at 08:08:16PM -0400, Ben Collins wrote:
> > The 28xb, as documented in comments, has the same ID's as the 28x.
> > Remove the duplicated ID's from the device tables, and expand the
> > comment to document this.
> 
> Was this causing a problem somehow?  How did you notice this?  Good
> catch.

Wasn't causing a problem, but I wrote a script awhile back that parses
modules.alias looking for exact matches (doesn't do any fnmatch stuff,
which might show more overlaps). Attached so you can see where this is
coming from.

Mainly I wrote it to make sure we didn't have any module overlap
(hostap/orinico kind of stuff), but it catches same module matching as
well.

> I'll add it to my queue, thanks,

Np

#!/usr/bin/perl -w

my %map;

if (!defined($ARGV[0])) {
	print STDERR "Usage: check-aliases <modules.alias>\n";
	exit(1);
}

$aliases = $ARGV[0];

open(ALIASES, "< $aliases") or die "Could not open $aliases";

while (<ALIASES>) {
	chomp;
	my ($junk, $alias, $module) = split;

	if (defined($map{$alias})) {
		printf("%s %20s / %-20s : %s \n", ("$map{$alias}" eq "$module")
			? "INT" : "   ", $map{$alias}, $module, $alias);
	} else {
		$map{$alias} = $module;
	}
}

exit(0);



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-27 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27  0:08 [PATCH] keyspan: Remove duplicate device entries Ben Collins
2008-06-27  3:47 ` Greg KH
2008-06-27 14:32   ` Ben Collins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox