On Tue, 22 Mar 2005, Nick Sillik wrote:
> Well, I have attached the diff for linux-2.6.12-rc1-mm1 to this message. This
> patch does cleanly compile. Take a look at it, if you like it apply it. If
> not,
> I'll keep hacking. (I'll keep this bottle of champagne - which has been
> waiting
> for a while - on ice.)
This is looking pretty good. There are still a few small items to clean
up:
+int onetouch_connect_input(struct us_data *ss)
+{
+ struct usb_device *udev = ss->pusb_dev;
+ struct usb_onetouch *onetouch;
+ char path[64];
+
+ if (udev->descriptor.idVendor != VENDOR_MAXTOR
+ || udev->descriptor.idProduct != PRODUCT_ONETOUCH) {
+ /* Not a onetouch device, nothing to see here */
+ return 1;
+ }
This check isn't needed any more. The function won't get called at all
unless the descriptors match as specified in the unusual_devs entry.
+void onetouch_release_input(void *onetouch_)
+{
+ struct usb_onetouch *onetouch = (struct usb_onetouch *) onetouch_;
+
+ US_DEBUGP("device found: %s. Releasing\n", onetouch->phys);
+ usb_unlink_urb(onetouch->irq);
For the sake of thoroughness this call should be usb_kill_urb.
--- linux-2.6.12-rc1-mm1/drivers/usb/storage/onetouch.h 1969-12-31
19:00:00.000000000 -0500
+++ linux-2.6.12-rc1-mm1-onetouch/drivers/usb/storage/onetouch.h
2005-03-22 20:00:03.000000000 -0500
@@ -0,0 +1,12 @@
+#ifndef _ONETOUCH_H_
+#define _ONETOUCH_H_
+
+#define ONETOUCH_PKT_LEN 0x02
+#define ONETOUCH_BUTTON KEY_PROG1
+#define VENDOR_MAXTOR 0x0d49
+#define PRODUCT_ONETOUCH 0x7010
+
+int onetouch_connect_input(struct us_data *ss);
+void onetouch_release_input(void *onetouch_);
Far as I can tell you don't need the VENDOR_MAXTOR or PRODUCT_ONETOUCH
constants any more, so they can go. You also don't need the declaration
of onetouch_release_input, since it isn't used anywhere outside your
source file.
Alan Stern
-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel