public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] usb/serial/oti6858.c: cleanups
@ 2007-11-05 17:07 Adrian Bunk
  2007-11-05 20:40 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2007-11-05 17:07 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb-devel, linux-kernel

This patch containsthe following cleanups:
- make the needlessly global send_data() static
- an author without anemail address is OK, not a FIXME
- directly put the IDs into the id_table
- remove the now-empty oti6858.h
- kill the pointless driver version number

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 drivers/usb/serial/oti6858.c |   11 ++++-------
 drivers/usb/serial/oti6858.h |   15 ---------------
 2 files changed, 4 insertions(+), 22 deletions(-)

5474a38a5cef955b81b342892c2ba5730545cdba 
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index eea226a..8eff5e0 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -2,7 +2,7 @@
  * Ours Technology Inc. OTi-6858 USB to serial adapter driver.
  *
  * Copyleft  (C) 2007 Kees Lemmens (adapted for kernel 2.6.20)
- * Copyright (C) 2006 Tomasz Michal Lukaszewski (FIXME: add e-mail)
+ * Copyright (C) 2006 Tomasz Michal Lukaszewski
  * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
  * Copyright (C) 2003 IBM Corp.
  *
@@ -50,15 +50,13 @@
 #include <linux/usb.h>
 #include <linux/usb/serial.h>
 #include <asm/uaccess.h>
-#include "oti6858.h"
 
 #define OTI6858_DESCRIPTION \
 	"Ours Technology Inc. OTi-6858 USB to serial adapter driver"
-#define OTI6858_AUTHOR "Tomasz Michal Lukaszewski <FIXME@FIXME>"
-#define OTI6858_VERSION "0.1"
+#define OTI6858_AUTHOR "Tomasz Michal Lukaszewski"
 
 static struct usb_device_id id_table [] = {
-	{ USB_DEVICE(OTI6858_VENDOR_ID, OTI6858_PRODUCT_ID) },
+	{ USB_DEVICE(0x0ea0, 0x6858) },
 	{ }
 };
 
@@ -298,7 +296,7 @@ static void setup_line(struct work_struct *work)
 	}
 }
 
-void send_data(struct work_struct *work)
+static void send_data(struct work_struct *work)
 {
 	struct oti6858_private *priv = container_of(work, struct oti6858_private, delayed_write_work.work);
 	struct usb_serial_port *port = priv->port;
@@ -1317,7 +1315,6 @@ module_exit(oti6858_exit);
 
 MODULE_DESCRIPTION(OTI6858_DESCRIPTION);
 MODULE_AUTHOR(OTI6858_AUTHOR);
-MODULE_VERSION(OTI6858_VERSION);
 MODULE_LICENSE("GPL");
 
 module_param(debug, bool, S_IRUGO | S_IWUSR);
diff --git a/drivers/usb/serial/oti6858.h b/drivers/usb/serial/oti6858.h
deleted file mode 100644
index 704ac3a..0000000
--- a/drivers/usb/serial/oti6858.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Ours Technology Inc. OTi-6858 USB to serial adapter driver.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-#ifndef __LINUX_USB_SERIAL_OTI6858_H
-#define __LINUX_USB_SERIAL_OTI6858_H
-
-#define OTI6858_VENDOR_ID	0x0ea0
-#define OTI6858_PRODUCT_ID	0x6858
-
-#endif


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

* Re: [2.6 patch] usb/serial/oti6858.c: cleanups
  2007-11-05 17:07 [2.6 patch] usb/serial/oti6858.c: cleanups Adrian Bunk
@ 2007-11-05 20:40 ` Oliver Neukum
  2007-11-12 10:37   ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2007-11-05 20:40 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: gregkh, linux-usb-devel, linux-kernel

Am Montag 05 November 2007 schrieb Adrian Bunk:
> This patch containsthe following cleanups:
> - make the needlessly global send_data() static
> - an author without anemail address is OK, not a FIXME

That should be up to the author. If he thinks it should be there it might
be worth a FIXME

> - directly put the IDs into the id_table

Why?

> - remove the now-empty oti6858.h
> - kill the pointless driver version number

Why? There might be a new version in the future. If the author put
it there he might have had his reasons.

	Regards
		Oliver



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

* Re: [2.6 patch] usb/serial/oti6858.c: cleanups
  2007-11-05 20:40 ` Oliver Neukum
@ 2007-11-12 10:37   ` Adrian Bunk
  2007-11-12 13:14     ` [linux-usb-devel] " Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2007-11-12 10:37 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: gregkh, linux-usb-devel, linux-kernel

On Mon, Nov 05, 2007 at 09:40:43PM +0100, Oliver Neukum wrote:
> Am Montag 05 November 2007 schrieb Adrian Bunk:
> > This patch containsthe following cleanups:
> > - make the needlessly global send_data() static
> > - an author without anemail address is OK, not a FIXME
> 
> That should be up to the author. If he thinks it should be there it might
> be worth a FIXME

I would be very surprised if the reason for these FIXMEs was different 
from the driver submitter not knowing a current address of the author...

> > - directly put the IDs into the id_table
> 
> Why?

I don't have a strong opinion on this one, but my impression was that 
there's generally a move away from using once-used #define's for such 
stuff.

> > - remove the now-empty oti6858.h
> > - kill the pointless driver version number
> 
> Why? There might be a new version in the future. If the author put
> it there he might have had his reasons.

A version number makes sense when there's a maintainer who is 
maintaining and using it to identify different versions of a driver.

But some ancient version number that contains less information than
"the version of this driver shipped with kernel 2.6.xy" doesn't have any 
value.

> 	Regards
> 		Oliver

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [linux-usb-devel] [2.6 patch] usb/serial/oti6858.c: cleanups
  2007-11-12 10:37   ` Adrian Bunk
@ 2007-11-12 13:14     ` Oliver Neukum
  2007-11-12 13:31       ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2007-11-12 13:14 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Adrian Bunk, gregkh, linux-kernel

Am Montag 12 November 2007 schrieb Adrian Bunk:
> On Mon, Nov 05, 2007 at 09:40:43PM +0100, Oliver Neukum wrote:
> > Am Montag 05 November 2007 schrieb Adrian Bunk:
> > > This patch containsthe following cleanups:
> > > - make the needlessly global send_data() static
> > > - an author without anemail address is OK, not a FIXME
> > 
> > That should be up to the author. If he thinks it should be there it might
> > be worth a FIXME
> 
> I would be very surprised if the reason for these FIXMEs was different 
> from the driver submitter not knowing a current address of the author...

Is there any evidence the author didn't submit it?

> > > - directly put the IDs into the id_table
> > 
> > Why?
> 
> I don't have a strong opinion on this one, but my impression was that 
> there's generally a move away from using once-used #define's for such 
> stuff.

Well, vendor IDs should be centralised.

> > > - remove the now-empty oti6858.h
> > > - kill the pointless driver version number
> > 
> > Why? There might be a new version in the future. If the author put
> > it there he might have had his reasons.
> 
> A version number makes sense when there's a maintainer who is 
> maintaining and using it to identify different versions of a driver.
> 
> But some ancient version number that contains less information than
> "the version of this driver shipped with kernel 2.6.xy" doesn't have any 
> value.

Very well.

	Regards
		Oliver

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

* Re: [linux-usb-devel] [2.6 patch] usb/serial/oti6858.c: cleanups
  2007-11-12 13:14     ` [linux-usb-devel] " Oliver Neukum
@ 2007-11-12 13:31       ` Adrian Bunk
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2007-11-12 13:31 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, gregkh, linux-kernel

On Mon, Nov 12, 2007 at 02:14:36PM +0100, Oliver Neukum wrote:
> Am Montag 12 November 2007 schrieb Adrian Bunk:
> > On Mon, Nov 05, 2007 at 09:40:43PM +0100, Oliver Neukum wrote:
> > > Am Montag 05 November 2007 schrieb Adrian Bunk:
> > > > This patch containsthe following cleanups:
> > > > - make the needlessly global send_data() static
> > > > - an author without anemail address is OK, not a FIXME
> > > 
> > > That should be up to the author. If he thinks it should be there it might
> > > be worth a FIXME
> > 
> > I would be very surprised if the reason for these FIXMEs was different 
> > from the driver submitter not knowing a current address of the author...
> 
> Is there any evidence the author didn't submit it?

Look at commit 49cdee0ed0fce9e1bda81f5dcad8d5cce6aec983.

> > > > - directly put the IDs into the id_table
> > > 
> > > Why?
> > 
> > I don't have a strong opinion on this one, but my impression was that 
> > there's generally a move away from using once-used #define's for such 
> > stuff.
> 
> Well, vendor IDs should be centralised.
>...

It was #define OTI6858_VENDOR_ID      0x0ea0

And the only other usages of this vendor ID are in 
drivers/usb/storage/unusual_devs.h where vendor ID
defines do not seem to be used at all...

> 	Regards
> 		Oliver

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2007-11-12 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05 17:07 [2.6 patch] usb/serial/oti6858.c: cleanups Adrian Bunk
2007-11-05 20:40 ` Oliver Neukum
2007-11-12 10:37   ` Adrian Bunk
2007-11-12 13:14     ` [linux-usb-devel] " Oliver Neukum
2007-11-12 13:31       ` Adrian Bunk

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