]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.20-rc3-USB.patch
- obsolete
[packages/kernel.git] / linux-2.4.20-rc3-USB.patch
CommitLineData
c5d96f5a 1diff -Nur linux-2.4.19.old/drivers/usb/CDCEther.c linux-2.4.19/drivers/usb/CDCEther.c
2--- linux-2.4.19.old/drivers/usb/CDCEther.c Sat Aug 3 02:39:44 2002
3+++ linux-2.4.19/drivers/usb/CDCEther.c Mon Nov 25 12:26:54 2002
4@@ -148,7 +148,7 @@
5 // Give this to the USB subsystem so it can tell us
6 // when more data arrives.
7 if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
8- warn( __FUNCTION__ " failed submit rx_urb %d", res);
9+ warn("%s failed submit rx_urb %d", __FUNCTION__, res);
10 }
11
12 // We are no longer busy, show us the frames!!!
13@@ -379,7 +379,7 @@
14
15 // Turn on the USB and let the packets flow!!!
16 if ( (res = enable_net_traffic( ether_dev )) ) {
17- err( __FUNCTION__ "can't enable_net_traffic() - %d", res );
18+ err("%s can't enable_net_traffic() - %d", __FUNCTION__, res );
19 return -EIO;
20 }
21
22@@ -392,7 +392,7 @@
23 /* Put it out there so the device can send us stuff */
24 if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
25 /* Hmm... Okay... */
26- warn( __FUNCTION__ " failed rx_urb %d", res );
27+ warn( "%s failed rx_urb %d", __FUNCTION__, res );
28 }
29
30 if (ether_dev->properties & HAVE_NOTIFICATION_ELEMENT) {
31@@ -406,7 +406,7 @@
32 ether_dev,
33 ether_dev->intr_interval);
34 if ( (res = usb_submit_urb(&ether_dev->intr_urb)) ) {
35- warn( __FUNCTION__ " failed intr_urb %d", res );
36+ warn("%s failed intr_urb %d", __FUNCTION__, res );
37 }
38 }
39
40@@ -497,14 +497,14 @@
41 static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
42 {
43 #if 0
44- devrequest *dr = &ether_dev->ctrl_dr;
45+ struct usb_ctrlrequest *dr = &ether_dev->ctrl_dr;
46 int res;
47
48- dr->requesttype = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
49- dr->request = SET_ETHERNET_PACKET_FILTER;
50- dr->value = cpu_to_le16(ether_dev->mode_flags);
51- dr->index = cpu_to_le16((u16)ether_dev->comm_interface);
52- dr->length = 0;
53+ dr->bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
54+ dr->bRequest = SET_ETHERNET_PACKET_FILTER;
55+ dr->wValue = cpu_to_le16(ether_dev->mode_flags);
56+ dr->wIndex = cpu_to_le16((u16)ether_dev->comm_interface);
57+ dr->wLength = 0;
58
59 FILL_CONTROL_URB(&ether_dev->ctrl_urb,
60 ether_dev->usb,
61@@ -515,7 +515,7 @@
62 setpktfilter_done,
63 ether_dev);
64 if ( (res = usb_submit_urb(&ether_dev->ctrl_urb)) ) {
65- warn( __FUNCTION__ " failed submit ctrl_urb %d", res);
66+ warn("%s failed submit ctrl_urb %d", __FUNCTION__, res);
67 }
68 #endif
69
70diff -Nur linux-2.4.19.old/drivers/usb/CDCEther.h linux-2.4.19/drivers/usb/CDCEther.h
71--- linux-2.4.19.old/drivers/usb/CDCEther.h Sat Aug 3 02:39:44 2002
72+++ linux-2.4.19/drivers/usb/CDCEther.h Mon Nov 25 12:26:54 2002
73@@ -75,7 +75,7 @@
74 __u8 bNumberPowerFilters;
75 __u16 mode_flags;
76 int intr_interval;
77- devrequest ctrl_dr;
78+ struct usb_ctrlrequest ctrl_dr;
79 struct urb rx_urb, tx_urb, intr_urb, ctrl_urb;
80 unsigned char rx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
81 unsigned char tx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
82diff -Nur linux-2.4.19.old/drivers/usb/Config.in linux-2.4.19/drivers/usb/Config.in
83--- linux-2.4.19.old/drivers/usb/Config.in Sat Aug 3 02:39:44 2002
84+++ linux-2.4.19/drivers/usb/Config.in Mon Nov 25 12:26:54 2002
85@@ -33,6 +33,7 @@
86 dep_tristate ' USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
87 dep_tristate ' EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
88 dep_tristate ' USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
89+ dep_tristate ' USB MIDI support' CONFIG_USB_MIDI $CONFIG_USB
90 if [ "$CONFIG_SCSI" = "n" ]; then
91 comment ' SCSI support is needed for USB Storage'
92 fi
93@@ -44,6 +45,7 @@
94 dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
95 dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
96 dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
97+ dep_mbool ' SanDisk SDDR-55 SmartMedia support' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
98 dep_mbool ' Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
99 dep_tristate ' USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
100 dep_tristate ' USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
101@@ -59,6 +61,7 @@
102 dep_tristate ' USB HIDBP Keyboard (basic) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
103 dep_tristate ' USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
104 fi
105+ dep_tristate ' Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
106 dep_tristate ' Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
107
108 comment 'USB Imaging devices'
109@@ -101,6 +104,8 @@
110 comment 'USB Miscellaneous drivers'
111 dep_tristate ' USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
112 dep_tristate ' USB Auerswald ISDN support (EXPERIMENTAL)' CONFIG_USB_AUERSWALD $CONFIG_USB $CONFIG_EXPERIMENTAL
113+ dep_tristate ' Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
114 dep_tristate ' Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
115+ dep_tristate ' USB LCD device support' CONFIG_USB_LCD $CONFIG_USB
116 fi
117 endmenu
118diff -Nur linux-2.4.19.old/drivers/usb/Makefile linux-2.4.19/drivers/usb/Makefile
119--- linux-2.4.19.old/drivers/usb/Makefile Sat Aug 3 02:39:44 2002
120+++ linux-2.4.19/drivers/usb/Makefile Mon Nov 25 12:26:54 2002
121@@ -62,6 +62,7 @@
122 obj-$(CONFIG_USB_MOUSE) += usbmouse.o
123 obj-$(CONFIG_USB_HID) += hid.o
124 obj-$(CONFIG_USB_KBD) += usbkbd.o
125+obj-$(CONFIG_USB_AIPTEK) += aiptek.o
126 obj-$(CONFIG_USB_WACOM) += wacom.o
127
128 obj-$(CONFIG_USB_SCANNER) += scanner.o
129@@ -69,6 +70,7 @@
130 obj-$(CONFIG_USB_PRINTER) += printer.o
131 obj-$(CONFIG_USB_AUDIO) += audio.o
132 obj-$(CONFIG_USB_EMI26) += emi26.o
133+obj-$(CONFIG_USB_MIDI) += usb-midi.o
134 obj-$(CONFIG_USB_IBMCAM) += ibmcam.o usbvideo.o ultracam.o
135 obj-$(CONFIG_USB_PWC) += pwc.o
136 obj-$(CONFIG_USB_DC2XX) += dc2xx.o
137@@ -85,6 +87,7 @@
138 obj-$(CONFIG_USB_KAWETH) += kaweth.o
139 obj-$(CONFIG_USB_CDCETHER) += CDCEther.o
140 obj-$(CONFIG_USB_RIO500) += rio500.o
141+obj-$(CONFIG_USB_TIGL) += tiglusb.o
142 obj-$(CONFIG_USB_DSBR) += dsbr100.o
143 obj-$(CONFIG_USB_MICROTEK) += microtek.o
144 obj-$(CONFIG_USB_HPUSBSCSI) += hpusbscsi.o
145@@ -92,6 +95,7 @@
146 obj-$(CONFIG_USB_USBNET) += usbnet.o
147 obj-$(CONFIG_USB_AUERSWALD) += auerswald.o
148 obj-$(CONFIG_USB_BRLVGER) += brlvger.o
149+obj-$(CONFIG_USB_LCD) += usblcd.o
150
151 # Object files in subdirectories
152 mod-subdirs := serial hcd
153diff -Nur linux-2.4.19.old/drivers/usb/acm.c linux-2.4.19/drivers/usb/acm.c
154--- linux-2.4.19.old/drivers/usb/acm.c Fri Oct 5 21:06:08 2001
155+++ linux-2.4.19/drivers/usb/acm.c Mon Nov 25 12:26:54 2002
156@@ -184,7 +184,7 @@
157 static void acm_ctrl_irq(struct urb *urb)
158 {
159 struct acm *acm = urb->context;
160- devrequest *dr = urb->transfer_buffer;
161+ struct usb_ctrlrequest *dr = urb->transfer_buffer;
162 unsigned char *data = (unsigned char *)(dr + 1);
163 int newctrl;
164
165@@ -195,7 +195,7 @@
166 return;
167 }
168
169- switch (dr->request) {
170+ switch (dr->bRequest) {
171
172 case ACM_IRQ_NETWORK:
173
174@@ -223,7 +223,7 @@
175
176 default:
177 dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
178- dr->request, dr->index, dr->length, data[0], data[1]);
179+ dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
180 return;
181 }
182 }
183diff -Nur linux-2.4.19.old/drivers/usb/aiptek.c linux-2.4.19/drivers/usb/aiptek.c
184--- linux-2.4.19.old/drivers/usb/aiptek.c Thu Jan 1 01:00:00 1970
185+++ linux-2.4.19/drivers/usb/aiptek.c Mon Nov 25 12:26:54 2002
186@@ -0,0 +1,332 @@
187+/*
188+ * Native support for the Aiptek 8000U
189+ *
190+ * Copyright (c) 2001 Chris Atenasio <chris@crud.net>
191+ *
192+ * based on wacom.c by
193+ * Vojtech Pavlik <vojtech@suse.cz>
194+ * Andreas Bach Aaen <abach@stofanet.dk>
195+ * Clifford Wolf <clifford@clifford.at>
196+ * Sam Mosel <sam.mosel@computer.org>
197+ * James E. Blair <corvus@gnu.org>
198+ * Daniel Egger <egger@suse.de>
199+ *
200+ *
201+ * Many thanks to Oliver Kuechemann for his support.
202+ *
203+ * ChangeLog:
204+ * v0.1 - Initial release
205+ * v0.2 - Hack to get around fake event 28's.
206+ * v0.3 - Make URB dynamic (Bryan W. Headley, Jun-8-2002)
207+ */
208+
209+/*
210+ * This program is free software; you can redistribute it and/or modify
211+ * it under the terms of the GNU General Public License as published by
212+ * the Free Software Foundation; either version 2 of the License, or
213+ * (at your option) any later version.
214+ *
215+ * This program is distributed in the hope that it will be useful,
216+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
217+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
218+ * GNU General Public License for more details.
219+ *
220+ * You should have received a copy of the GNU General Public License
221+ * along with this program; if not, write to the Free Software
222+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
223+ */
224+
225+#include <linux/kernel.h>
226+#include <linux/slab.h>
227+#include <linux/input.h>
228+#include <linux/module.h>
229+#include <linux/init.h>
230+#include <linux/usb.h>
231+
232+/*
233+ * Version Information
234+ */
235+#define DRIVER_VERSION "v0.3"
236+#define DRIVER_AUTHOR "Chris Atenasio <chris@crud.net>"
237+#define DRIVER_DESC "USB Aiptek 6000U/8000U tablet driver (Linux 2.4.x)"
238+
239+MODULE_AUTHOR(DRIVER_AUTHOR);
240+MODULE_DESCRIPTION(DRIVER_DESC);
241+MODULE_LICENSE("GPL");
242+
243+/*
244+ * Aiptek status packet:
245+ *
246+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
247+ * byte0 0 0 0 0 0 0 1 0
248+ * byte1 X7 X6 X5 X4 X3 X2 X1 X0
249+ * byte2 X15 X14 X13 X12 X11 X10 X9 X8
250+ * byte3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
251+ * byte4 Y15 Y14 Y13 Y12 Y11 Y10 Y9 Y8
252+ * byte5 * * * BS2 BS1 Tip DV IR
253+ * byte6 P7 P6 P5 P4 P3 P2 P1 P0
254+ * byte7 P15 P14 P13 P12 P11 P10 P9 P8
255+ *
256+ * IR: In Range = Proximity on
257+ * DV = Data Valid
258+ *
259+ *
260+ * Command Summary:
261+ *
262+ * Command/Data Description Return Bytes Return Value
263+ * 0x10/0x00 SwitchToMouse 0
264+ * 0x10/0x01 SwitchToTablet 0
265+ * 0x18/0x04 Resolution500LPI 0
266+ * 0x17/0x00 FilterOn 0
267+ * 0x12/0xFF AutoGainOn 0
268+ * 0x01/0x00 GetXExtension 2 MaxX
269+ * 0x01/0x01 GetYExtension 2 MaxY
270+ * 0x02/0x00 GetModelCode 2 ModelCode = LOBYTE
271+ * 0x03/0x00 GetODMCode 2 ODMCode
272+ * 0x08/0x00 GetPressureLevels 2 =512
273+ * 0x04/0x00 GetFirmwareVersion 2 Firmware Version
274+ *
275+ *
276+ * To initialize the tablet:
277+ *
278+ * (1) Send command Resolution500LPI
279+ * (2) Option Commands (GetXExtension, GetYExtension)
280+ * (3) Send command SwitchToTablet
281+ */
282+
283+#define USB_VENDOR_ID_AIPTEK 0x08ca
284+
285+struct aiptek_features {
286+ char *name;
287+ int pktlen;
288+ int x_max;
289+ int y_max;
290+ int pressure_min;
291+ int pressure_max;
292+ void (*irq) (struct urb * urb);
293+ unsigned long evbit;
294+ unsigned long absbit;
295+ unsigned long relbit;
296+ unsigned long btnbit;
297+ unsigned long digibit;
298+};
299+
300+struct aiptek {
301+ signed char data[10];
302+ struct input_dev dev;
303+ struct usb_device *usbdev;
304+ struct urb *irq;
305+ struct aiptek_features *features;
306+ int tool;
307+ int open;
308+};
309+
310+static void
311+aiptek_irq(struct urb *urb)
312+{
313+ struct aiptek *aiptek = urb->context;
314+ unsigned char *data = aiptek->data;
315+ struct input_dev *dev = &aiptek->dev;
316+ int x;
317+ int y;
318+ int pressure;
319+ int proximity;
320+
321+ if (urb->status)
322+ return;
323+
324+ if ((data[0] & 2) == 0) {
325+ dbg("received unknown report #%d", data[0]);
326+ }
327+
328+ proximity = data[5] & 0x01;
329+ input_report_key(dev, BTN_TOOL_PEN, proximity);
330+
331+ x = ((__u32) data[1]) | ((__u32) data[2] << 8);
332+ y = ((__u32) data[3]) | ((__u32) data[4] << 8);
333+ pressure = ((__u32) data[6]) | ((__u32) data[7] << 8);
334+ pressure -= aiptek->features->pressure_min;
335+
336+ if (pressure < 0) {
337+ pressure = 0;
338+ }
339+
340+ if (proximity) {
341+ input_report_abs(dev, ABS_X, x);
342+ input_report_abs(dev, ABS_Y, y);
343+ input_report_abs(dev, ABS_PRESSURE, pressure);
344+ input_report_key(dev, BTN_TOUCH, data[5] & 0x04);
345+ input_report_key(dev, BTN_STYLUS, data[5] & 0x08);
346+ input_report_key(dev, BTN_STYLUS2, data[5] & 0x10);
347+ }
348+
349+}
350+
351+struct aiptek_features aiptek_features[] = {
352+ {"Aiptek 6000U/8000U",
353+ 8, 3000, 2250, 26, 511, aiptek_irq, 0, 0, 0, 0},
354+ {NULL, 0}
355+};
356+
357+struct usb_device_id aiptek_ids[] = {
358+ {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), driver_info:0},
359+ {}
360+};
361+
362+MODULE_DEVICE_TABLE(usb, aiptek_ids);
363+
364+static int
365+aiptek_open(struct input_dev *dev)
366+{
367+ struct aiptek *aiptek = dev->private;
368+
369+ if (aiptek->open++)
370+ return 0;
371+
372+ aiptek->irq->dev = aiptek->usbdev;
373+ if (usb_submit_urb(aiptek->irq))
374+ return -EIO;
375+
376+ return 0;
377+}
378+
379+static void
380+aiptek_close(struct input_dev *dev)
381+{
382+ struct aiptek *aiptek = dev->private;
383+
384+ if (!--aiptek->open)
385+ usb_unlink_urb(aiptek->irq);
386+}
387+
388+static void
389+aiptek_command(struct usb_device *dev, unsigned int ifnum,
390+ unsigned char command, unsigned char data)
391+{
392+ __u8 buf[3];
393+
394+ buf[0] = 4;
395+ buf[1] = command;
396+ buf[2] = data;
397+
398+ if (usb_set_report(dev, ifnum, 3, 2, buf, 3) != 3) {
399+ dbg("aiptek_command: 0x%x 0x%x\n", command, data);
400+ }
401+}
402+
403+static void*
404+aiptek_probe(struct usb_device *dev, unsigned int ifnum,
405+ const struct usb_device_id *id)
406+{
407+ struct usb_endpoint_descriptor *endpoint;
408+ struct aiptek *aiptek;
409+
410+ if (!(aiptek = kmalloc(sizeof (struct aiptek), GFP_KERNEL)))
411+ return NULL;
412+
413+ memset(aiptek, 0, sizeof (struct aiptek));
414+
415+ aiptek->irq = usb_alloc_urb(0);
416+ if (!aiptek->irq) {
417+ kfree(aiptek);
418+ return NULL;
419+ }
420+
421+ // Resolution500LPI
422+ aiptek_command(dev, ifnum, 0x18, 0x04);
423+
424+ // SwitchToTablet
425+ aiptek_command(dev, ifnum, 0x10, 0x01);
426+
427+ aiptek->features = aiptek_features + id->driver_info;
428+
429+ aiptek->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC) |
430+ aiptek->features->evbit;
431+
432+ aiptek->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) |
433+ BIT(ABS_MISC) | aiptek->features->absbit;
434+
435+ aiptek->dev.relbit[0] |= aiptek->features->relbit;
436+
437+ aiptek->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) |
438+ BIT(BTN_MIDDLE) | aiptek->features->btnbit;
439+
440+ aiptek->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) |
441+ BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOUCH) |
442+ BIT(BTN_STYLUS) | BIT(BTN_STYLUS2) | aiptek->features->digibit;
443+
444+ aiptek->dev.mscbit[0] = BIT(MSC_SERIAL);
445+
446+ aiptek->dev.absmax[ABS_X] = aiptek->features->x_max;
447+ aiptek->dev.absmax[ABS_Y] = aiptek->features->y_max;
448+ aiptek->dev.absmax[ABS_PRESSURE] = aiptek->features->pressure_max -
449+ aiptek->features->pressure_min;
450+
451+ aiptek->dev.absfuzz[ABS_X] = 0;
452+ aiptek->dev.absfuzz[ABS_Y] = 0;
453+
454+ aiptek->dev.private = aiptek;
455+ aiptek->dev.open = aiptek_open;
456+ aiptek->dev.close = aiptek_close;
457+
458+ aiptek->dev.name = aiptek->features->name;
459+ aiptek->dev.idbus = BUS_USB;
460+ aiptek->dev.idvendor = dev->descriptor.idVendor;
461+ aiptek->dev.idproduct = dev->descriptor.idProduct;
462+ aiptek->dev.idversion = dev->descriptor.bcdDevice;
463+ aiptek->usbdev = dev;
464+
465+ endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
466+
467+ FILL_INT_URB(aiptek->irq,
468+ dev,
469+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
470+ aiptek->data,
471+ aiptek->features->pktlen,
472+ aiptek->features->irq,
473+ aiptek,
474+ endpoint->bInterval);
475+
476+ input_register_device(&aiptek->dev);
477+
478+ printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
479+ aiptek->dev.number, aiptek->features->name, dev->bus->busnum,
480+ dev->devnum, ifnum);
481+
482+ return aiptek;
483+}
484+
485+static void
486+aiptek_disconnect(struct usb_device *dev, void *ptr)
487+{
488+ struct aiptek *aiptek = ptr;
489+ usb_unlink_urb(aiptek->irq);
490+ input_unregister_device(&aiptek->dev);
491+ usb_free_urb(aiptek->irq);
492+ kfree(aiptek);
493+}
494+
495+static struct usb_driver aiptek_driver = {
496+ name:"aiptek",
497+ probe:aiptek_probe,
498+ disconnect:aiptek_disconnect,
499+ id_table:aiptek_ids,
500+};
501+
502+static int __init
503+aiptek_init(void)
504+{
505+ usb_register(&aiptek_driver);
506+ info(DRIVER_VERSION " " DRIVER_AUTHOR);
507+ info(DRIVER_DESC);
508+ return 0;
509+}
510+
511+static void __exit
512+aiptek_exit(void)
513+{
514+ usb_deregister(&aiptek_driver);
515+}
516+
517+module_init(aiptek_init);
518+module_exit(aiptek_exit);
519diff -Nur linux-2.4.19.old/drivers/usb/audio.c linux-2.4.19/drivers/usb/audio.c
520--- linux-2.4.19.old/drivers/usb/audio.c Sat Aug 3 02:39:44 2002
521+++ linux-2.4.19/drivers/usb/audio.c Mon Nov 25 12:26:54 2002
522@@ -297,13 +297,13 @@
523 #define FLG_CONNECTED 32
524
525 struct my_data_urb {
526- urb_t urb;
527- iso_packet_descriptor_t isoframe[DESCFRAMES];
528+ struct urb urb;
529+ struct iso_packet_descriptor isoframe[DESCFRAMES];
530 };
531
532 struct my_sync_urb {
533- urb_t urb;
534- iso_packet_descriptor_t isoframe[SYNCFRAMES];
535+ struct urb urb;
536+ struct iso_packet_descriptor isoframe[SYNCFRAMES];
537 };
538
539
540@@ -833,7 +833,7 @@
541 }
542 }
543
544-static int usbin_prepare_desc(struct usbin *u, purb_t urb)
545+static int usbin_prepare_desc(struct usbin *u, struct urb *urb)
546 {
547 unsigned int i, maxsize, offs;
548
549@@ -850,7 +850,7 @@
550 * return value: 0 if descriptor should be restarted, -1 otherwise
551 * convert sample format on the fly if necessary
552 */
553-static int usbin_retire_desc(struct usbin *u, purb_t urb)
554+static int usbin_retire_desc(struct usbin *u, struct urb *urb)
555 {
556 unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, dmafree;
557 unsigned char *cp;
558@@ -930,7 +930,7 @@
559 /*
560 * we output sync data
561 */
562-static int usbin_sync_prepare_desc(struct usbin *u, purb_t urb)
563+static int usbin_sync_prepare_desc(struct usbin *u, struct urb *urb)
564 {
565 unsigned char *cp = urb->transfer_buffer;
566 unsigned int i, offs;
567@@ -948,7 +948,7 @@
568 /*
569 * return value: 0 if descriptor should be restarted, -1 otherwise
570 */
571-static int usbin_sync_retire_desc(struct usbin *u, purb_t urb)
572+static int usbin_sync_retire_desc(struct usbin *u, struct urb *urb)
573 {
574 unsigned int i;
575
576@@ -996,7 +996,7 @@
577 {
578 struct usb_device *dev = as->state->usbdev;
579 struct usbin *u = &as->usbin;
580- purb_t urb;
581+ struct urb *urb;
582 unsigned long flags;
583 unsigned int maxsze, bufsz;
584
585@@ -1186,7 +1186,7 @@
586 }
587 }
588
589-static int usbout_prepare_desc(struct usbout *u, purb_t urb)
590+static int usbout_prepare_desc(struct usbout *u, struct urb *urb)
591 {
592 unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, offs;
593 unsigned char *cp = urb->transfer_buffer;
594@@ -1238,7 +1238,7 @@
595 /*
596 * return value: 0 if descriptor should be restarted, -1 otherwise
597 */
598-static int usbout_retire_desc(struct usbout *u, purb_t urb)
599+static int usbout_retire_desc(struct usbout *u, struct urb *urb)
600 {
601 unsigned int i;
602
603@@ -1285,7 +1285,7 @@
604 spin_unlock_irqrestore(&as->lock, flags);
605 }
606
607-static int usbout_sync_prepare_desc(struct usbout *u, purb_t urb)
608+static int usbout_sync_prepare_desc(struct usbout *u, struct urb *urb)
609 {
610 unsigned int i, offs;
611
612@@ -1299,7 +1299,7 @@
613 /*
614 * return value: 0 if descriptor should be restarted, -1 otherwise
615 */
616-static int usbout_sync_retire_desc(struct usbout *u, purb_t urb)
617+static int usbout_sync_retire_desc(struct usbout *u, struct urb *urb)
618 {
619 unsigned char *cp = urb->transfer_buffer;
620 unsigned int f, i;
621@@ -1361,7 +1361,7 @@
622 {
623 struct usb_device *dev = as->state->usbdev;
624 struct usbout *u = &as->usbout;
625- purb_t urb;
626+ struct urb *urb;
627 unsigned long flags;
628 unsigned int maxsze, bufsz;
629
630diff -Nur linux-2.4.19.old/drivers/usb/auerswald.c linux-2.4.19/drivers/usb/auerswald.c
631--- linux-2.4.19.old/drivers/usb/auerswald.c Sat Aug 3 02:39:44 2002
632+++ linux-2.4.19/drivers/usb/auerswald.c Mon Nov 25 12:26:54 2002
633@@ -2,7 +2,7 @@
634 /*
635 * auerswald.c -- Auerswald PBX/System Telephone usb driver.
636 *
637