## Automatically generated incremental diff
## From:   linux-2.5.64-bk12
## To:     linux-2.5.65
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.64-bk12/Makefile linux-2.5.65/Makefile
--- linux-2.5.64-bk12/Makefile	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/Makefile	Mon Mar 31 12:38:40 2003
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
-SUBLEVEL = 64
-EXTRAVERSION = -bk12
+SUBLEVEL = 65
+EXTRAVERSION =
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -900,8 +900,9 @@
 # - If they are equal no change, and no timestamp update
 
 define filechk
-	@echo '  CHK     $@';
-	@set -e; $(filechk_$(1)) > $@.tmp
+	@set -e;				\
+	echo '  CHK     $@';			\
+	$(filechk_$(1)) < $< > $@.tmp;		\
 	if [ -r $@ ] && cmp -s $@ $@.tmp; then	\
 		rm -f $@.tmp;			\
 	else					\
diff -urN linux-2.5.64-bk12/arch/i386/kernel/head.S linux-2.5.65/arch/i386/kernel/head.S
--- linux-2.5.64-bk12/arch/i386/kernel/head.S	Tue Mar  4 19:28:58 2003
+++ linux-2.5.65/arch/i386/kernel/head.S	Mon Mar 31 12:38:40 2003
@@ -130,7 +130,7 @@
 	popfl
 	jmp checkCPUtype
 1:
-#endif CONFIG_SMP
+#endif /* CONFIG_SMP */
 
 /*
  * Clear BSS first so that there are no surprises...
diff -urN linux-2.5.64-bk12/drivers/block/deadline-iosched.c linux-2.5.65/drivers/block/deadline-iosched.c
--- linux-2.5.64-bk12/drivers/block/deadline-iosched.c	Tue Mar  4 19:29:33 2003
+++ linux-2.5.65/drivers/block/deadline-iosched.c	Mon Mar 31 12:38:41 2003
@@ -608,6 +608,12 @@
 	if (unlikely(rq->flags & REQ_HARDBARRIER)) {
 		DL_INVALIDATE_HASH(dd);
 		q->last_merge = NULL;
+
+		while (deadline_dispatch_requests(dd))
+			;
+
+		list_add_tail(&rq->queuelist, dd->dispatch);
+		return;
 	}
 
 	if (unlikely(!blk_fs_request(rq))) {
diff -urN linux-2.5.64-bk12/drivers/usb/class/bluetty.c linux-2.5.65/drivers/usb/class/bluetty.c
--- linux-2.5.64-bk12/drivers/usb/class/bluetty.c	Tue Mar  4 19:29:32 2003
+++ linux-2.5.65/drivers/usb/class/bluetty.c	Mon Mar 31 12:38:41 2003
@@ -168,7 +168,7 @@
 	int			magic;
 	struct usb_device *	dev;
 	struct tty_driver *	tty_driver;	/* the tty_driver for this device */
-	struct tty_struct *	tty;		/* the coresponding tty for this port */
+	struct tty_struct *	tty;		/* the corresponding tty for this port */
 
 	unsigned char		minor;		/* the starting minor number for this device */
 	int			throttle;	/* throttled by tty layer */
@@ -1328,7 +1328,7 @@
 	int i;
 	int result;
 
-	/* Initalize our global data */
+	/* Initialize our global data */
 	for (i = 0; i < BLUETOOTH_TTY_MINORS; ++i) {
 		bluetooth_table[i] = NULL;
 	}
diff -urN linux-2.5.64-bk12/drivers/usb/class/cdc-acm.c linux-2.5.65/drivers/usb/class/cdc-acm.c
--- linux-2.5.64-bk12/drivers/usb/class/cdc-acm.c	Tue Mar  4 19:29:27 2003
+++ linux-2.5.65/drivers/usb/class/cdc-acm.c	Mon Mar 31 12:38:41 2003
@@ -138,9 +138,9 @@
  */
 
 struct acm {
-	struct usb_device *dev;				/* the coresponding usb device */
+	struct usb_device *dev;				/* the corresponding usb device */
 	struct usb_interface *iface;			/* the interfaces - +0 control +1 data */
-	struct tty_struct *tty;				/* the coresponding tty */
+	struct tty_struct *tty;				/* the corresponding tty */
 	struct urb *ctrlurb, *readurb, *writeurb;	/* urbs */
 	struct acm_line line;				/* line coding (bits, stop, parity) */
 	struct work_struct work;					/* work queue entry for line discipline waking up */
diff -urN linux-2.5.64-bk12/drivers/usb/class/usb-midi.c linux-2.5.65/drivers/usb/class/usb-midi.c
--- linux-2.5.64-bk12/drivers/usb/class/usb-midi.c	Tue Mar  4 19:28:56 2003
+++ linux-2.5.65/drivers/usb/class/usb-midi.c	Mon Mar 31 12:38:41 2003
@@ -1270,7 +1270,7 @@
 	return NULL;
 }
 
-/** Utility to find a class-specfic interface descriptor.
+/** Utility to find a class-specific interface descriptor.
  *  dsubtype is a descriptor subtype
  *  Called by parseDescriptor();
  **/
diff -urN linux-2.5.64-bk12/drivers/usb/core/hub.c linux-2.5.65/drivers/usb/core/hub.c
--- linux-2.5.64-bk12/drivers/usb/core/hub.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/core/hub.c	Mon Mar 31 12:38:41 2003
@@ -516,7 +516,7 @@
 
 	endpoint = &desc->endpoint[0].desc;
 
-	/* Output endpoint? Curiousier and curiousier.. */
+	/* Output endpoint? Curiouser and curiouser.. */
 	if (!(endpoint->bEndpointAddress & USB_DIR_IN)) {
 		goto descriptor_error;
 	}
@@ -958,7 +958,7 @@
 	int i, ret;
 
 	/*
-	 *  We restart the list everytime to avoid a deadlock with
+	 *  We restart the list every time to avoid a deadlock with
 	 * deleting hubs downstream from this one. This should be
 	 * safe since we delete the hub from the event list.
 	 * Not the most efficient, but avoids deadlocks.
diff -urN linux-2.5.64-bk12/drivers/usb/core/urb.c linux-2.5.65/drivers/usb/core/urb.c
--- linux-2.5.64-bk12/drivers/usb/core/urb.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/core/urb.c	Mon Mar 31 12:38:41 2003
@@ -69,7 +69,7 @@
  * usb_get_urb - increments the reference count of the urb
  * @urb: pointer to the urb to modify
  *
- * This must be  called whenever a urb is transfered from a device driver to a
+ * This must be  called whenever a urb is transferred from a device driver to a
  * host controller driver.  This allows proper reference counting to happen
  * for urbs.
  *
@@ -383,7 +383,7 @@
 {
 	/* FIXME
 	 * We should not care about the state here, but the host controllers
-	 * die a horrible death if we submit a urb for a device that has been
+	 * die a horrible death if we unlink a urb for a device that has been
 	 * physically removed.
 	 */
 	if (urb &&
diff -urN linux-2.5.64-bk12/drivers/usb/host/hc_simple.c linux-2.5.65/drivers/usb/host/hc_simple.c
--- linux-2.5.64-bk12/drivers/usb/host/hc_simple.c	Tue Mar  4 19:29:57 2003
+++ linux-2.5.65/drivers/usb/host/hc_simple.c	Mon Mar 31 12:38:41 2003
@@ -605,7 +605,7 @@
 /***************************************************************************
  * Function Name : sh_scan_iso_urb_list
  *
- * This function goes throught the isochronous urb list and schedule the 
+ * This function goes through the isochronous urb list and schedule the 
  * the transfer.   
  *
  * Note: This function has not tested yet
diff -urN linux-2.5.64-bk12/drivers/usb/host/hc_simple.h linux-2.5.65/drivers/usb/host/hc_simple.h
--- linux-2.5.64-bk12/drivers/usb/host/hc_simple.h	Tue Mar  4 19:29:55 2003
+++ linux-2.5.65/drivers/usb/host/hc_simple.h	Mon Mar 31 12:38:41 2003
@@ -44,8 +44,8 @@
 	int devnum;		/* Address of Root Hub endpoint */
 	void *urb;		/* interrupt URB of root hub */
 	int send;		/* active flag */
-	int interval;		/* intervall of roothub interrupt transfers */
-	struct timer_list rh_int_timer;	/* intervall timer for rh interrupt EP */
+	int interval;		/* interval of roothub interrupt transfers */
+	struct timer_list rh_int_timer;	/* interval timer for rh interrupt EP */
 };
 
 #if 1
diff -urN linux-2.5.64-bk12/drivers/usb/host/hc_sl811.h linux-2.5.65/drivers/usb/host/hc_sl811.h
--- linux-2.5.64-bk12/drivers/usb/host/hc_sl811.h	Tue Mar  4 19:29:04 2003
+++ linux-2.5.65/drivers/usb/host/hc_sl811.h	Mon Mar 31 12:38:41 2003
@@ -368,7 +368,7 @@
 
 #define SL11H_CTL1VAL_RESET	8
 
-/* Interrut enable (addr 6) and interrupt status register bits (addr 0xD) */
+/* Interrupt enable (addr 6) and interrupt status register bits (addr 0xD) */
 #define SL11H_INTMASK_XFERDONE	1
 #define SL11H_INTMASK_SOFINTR	0x10
 #define SL11H_INTMASK_INSRMV	0x20
diff -urN linux-2.5.64-bk12/drivers/usb/host/ohci-q.c linux-2.5.65/drivers/usb/host/ohci-q.c
--- linux-2.5.64-bk12/drivers/usb/host/ohci-q.c	Tue Mar  4 19:29:39 2003
+++ linux-2.5.65/drivers/usb/host/ohci-q.c	Mon Mar 31 12:38:41 2003
@@ -650,7 +650,7 @@
 /* calculate transfer length/status and update the urb
  * PRECONDITION:  irqsafe (only for urb->status locking)
  */
-static void td_done (struct urb *urb, struct td *td)
+static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
 {
 	u32	tdINFO = le32_to_cpup (&td->hwINFO);
 	int	cc = 0;
@@ -908,7 +908,7 @@
 			*prev = td->hwNextTD | savebits;
 
 			/* HC may have partly processed this TD */
-			td_done (urb, td);
+			td_done (ohci, urb, td);
 			urb_priv->td_cnt++;
 
 			/* if URB is done, clean up */
@@ -991,7 +991,7 @@
 		struct ed	*ed = td->ed;
 
 		/* update URB's length and status from TD */
-   		td_done (urb, td);
+   		td_done (ohci, urb, td);
   		urb_priv->td_cnt++;
 
 		/* If all this urb's TDs are done, call complete() */
diff -urN linux-2.5.64-bk12/drivers/usb/host/uhci-hcd.c linux-2.5.65/drivers/usb/host/uhci-hcd.c
--- linux-2.5.64-bk12/drivers/usb/host/uhci-hcd.c	Tue Mar  4 19:29:34 2003
+++ linux-2.5.65/drivers/usb/host/uhci-hcd.c	Mon Mar 31 12:38:41 2003
@@ -136,7 +136,7 @@
 	unsigned long flags;
 
 	spin_lock_irqsave(&uhci->complete_list_lock, flags);
-	list_add(&urbp->complete_list, &uhci->complete_list);
+	list_add_tail(&urbp->complete_list, &uhci->complete_list);
 	spin_unlock_irqrestore(&uhci->complete_list_lock, flags);
 }
 
diff -urN linux-2.5.64-bk12/drivers/usb/image/hpusbscsi.c linux-2.5.65/drivers/usb/image/hpusbscsi.c
--- linux-2.5.64-bk12/drivers/usb/image/hpusbscsi.c	Tue Mar  4 19:29:54 2003
+++ linux-2.5.65/drivers/usb/image/hpusbscsi.c	Mon Mar 31 12:38:41 2003
@@ -303,7 +303,7 @@
 		} else {
                 	usb_callback = simple_payload_callback;
 		}
-		/* Now we find out which direction data is to be transfered in */
+		/* Now we find out which direction data is to be transferred in */
 		hpusbscsi->current_data_pipe = DIRECTION_IS_IN(srb->cmnd[0]) ?
 			usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in)
 		:
@@ -410,7 +410,7 @@
 	}
 
 	if (hpusbscsi->scallback != NULL && hpusbscsi->state == HP_STATE_WAIT && scsi_state != CHECK_CONDITION <<1 )
-		/* we do a callback to the scsi layer if and only if all data has been transfered */
+		/* we do a callback to the scsi layer if and only if all data has been transferred */
 		hpusbscsi->scallback(hpusbscsi->srb);
 
 	TRACE_STATE;
diff -urN linux-2.5.64-bk12/drivers/usb/image/hpusbscsi.h linux-2.5.65/drivers/usb/image/hpusbscsi.h
--- linux-2.5.64-bk12/drivers/usb/image/hpusbscsi.h	Tue Mar  4 19:28:58 2003
+++ linux-2.5.65/drivers/usb/image/hpusbscsi.h	Mon Mar 31 12:38:41 2003
@@ -85,7 +85,7 @@
 
 /* defines for internal driver state */
 #define HP_STATE_FREE                 0  /*ready for next request */
-#define HP_STATE_BEGINNING      1  /*command being transfered */
+#define HP_STATE_BEGINNING      1  /*command being transferred */
 #define HP_STATE_WORKING         2  /* data transfer stage */
 #define HP_STATE_ERROR             3  /* error has been reported */
 #define HP_STATE_WAIT                 4  /* waiting for status transfer */
diff -urN linux-2.5.64-bk12/drivers/usb/image/scanner.c linux-2.5.65/drivers/usb/image/scanner.c
--- linux-2.5.64-bk12/drivers/usb/image/scanner.c	Tue Mar  4 19:29:04 2003
+++ linux-2.5.65/drivers/usb/image/scanner.c	Mon Mar 31 12:38:41 2003
@@ -1,7 +1,7 @@
 /* -*- linux-c -*- */
 
 /* 
- * Driver for USB Scanners (linux-2.5.64)
+ * Driver for USB Scanners (linux-2.5)
  *
  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
  * Copyright (C) 2002, 2003 Henning Meier-Geinitz
@@ -33,8 +33,8 @@
  *  0.1  8/31/1999
  *
  *    Developed/tested using linux-2.3.15 with minor ohci.c changes to
- *    support short packes during bulk xfer mode.  Some testing was
- *    done with ohci-hcd but the performace was low.  Very limited
+ *    support short packets during bulk xfer mode.  Some testing was
+ *    done with ohci-hcd but the performance was low.  Very limited
  *    testing was performed with uhci but I was unable to get it to
  *    work.  Initial relase to the linux-usb development effort.
  *
@@ -338,7 +338,7 @@
  *      Till Kamppeter <till.kamppeter@gmx.net> and others for all the ids.
  *    - Cleaned up list of vendor/product ids.
  *    - Print information about user-supplied ids only once at startup instead
- *      of everytime any USB device is plugged in.
+ *      of every time any USB device is plugged in.
  *    - Removed PV8630 ioctls. Use the standard ioctls instead.
  *    - Made endpoint detection more generic. Basically, only one bulk-in 
  *      endpoint is required, everything else is optional.
@@ -350,6 +350,9 @@
  *    - Added vendor/product ids for Artec, Avision, Brother, Medion, Primax,
  *      Prolink, Fujitsu, Plustek, and SYSCAN scanners.
  *    - Fixed generation of devfs names if dynamic minors are disabled.
+ *    - Used kobject reference counting to free the scn struct when the device
+ *      is closed and disconnected. Avoids crashes when writing to a 
+ *      disconnected device. (Thanks to Greg KH).
  *
  * TODO
  *    - Performance
@@ -427,6 +430,7 @@
 		return;
 	default:
 		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+	        return;	
 	}
 
 	dbg("irq_scanner(%d): data:%x", scn->scn_minor, *data);
@@ -461,6 +465,7 @@
 		return -ENODEV;
 	}
 	scn = usb_get_intfdata(intf);
+	kobject_get(&scn->kobj);
 
 	dev = scn->scn_dev;
 
@@ -521,6 +526,8 @@
 	up(&scn_mutex);
 	up(&(scn->sem));
 
+	kobject_put(&scn->kobj);
+
 	return 0;
 }
 
@@ -813,6 +820,37 @@
 	return retval;
 }
 
+static void destroy_scanner (struct kobject *kobj)
+{
+	struct scn_usb_data *scn;
+
+	dbg ("%s", __FUNCTION__);
+
+	scn = to_scanner(kobj);
+
+	down (&scn_mutex);
+	down (&(scn->sem));
+
+	usb_driver_release_interface(&scanner_driver,
+		&scn->scn_dev->actconfig->interface[scn->ifnum]);
+
+	kfree(scn->ibuf);
+	kfree(scn->obuf);
+
+	dbg("%s: De-allocating minor:%d", __FUNCTION__, scn->scn_minor);
+	devfs_unregister(scn->devfs);
+	usb_deregister_dev(1, scn->scn_minor);
+	usb_free_urb(scn->scn_irq);
+	usb_put_dev(scn->scn_dev);
+	up (&(scn->sem));
+	kfree (scn);
+	up (&scn_mutex);
+}
+
+static struct kobj_type scanner_kobj_type = {
+	.release = destroy_scanner,
+};
+
 static struct
 file_operations usb_scanner_fops = {
 	.owner =	THIS_MODULE,
@@ -982,6 +1020,8 @@
 		return -ENOMEM;
 	}
 	memset (scn, 0, sizeof(struct scn_usb_data));
+	kobject_init(&scn->kobj);
+	scn->kobj.ktype = &scanner_kobj_type;
 
 	scn->scn_irq = usb_alloc_urb(0, GFP_KERNEL);
 	if (!scn->scn_irq) {
@@ -1049,6 +1089,7 @@
 	}
 
 
+	usb_get_dev(dev);
 	scn->bulk_in_ep = have_bulk_in;
 	scn->bulk_out_ep = have_bulk_out;
 	scn->intr_ep = have_intr;
@@ -1089,28 +1130,13 @@
 	intf->kdev = NODEV;
 
 	usb_set_intfdata(intf, NULL);
-	if (scn) {
-		down (&scn_mutex);
-		down (&(scn->sem));
-
-		if(scn->intr_ep) {
-			dbg("disconnect_scanner(%d): Unlinking IRQ URB", scn->scn_minor);
-			usb_unlink_urb(scn->scn_irq);
-		}
-		usb_driver_release_interface(&scanner_driver,
-			&scn->scn_dev->actconfig->interface[scn->ifnum]);
-
-		kfree(scn->ibuf);
-		kfree(scn->obuf);
-
-		dbg("disconnect_scanner: De-allocating minor:%d", scn->scn_minor);
-		devfs_unregister(scn->devfs);
-		usb_deregister_dev(1, scn->scn_minor);
-		usb_free_urb(scn->scn_irq);
-		up (&(scn->sem));
-		kfree (scn);
-		up (&scn_mutex);
+	if(scn->intr_ep) {
+		dbg("%s(%d): Unlinking IRQ URB", __FUNCTION__, scn->scn_minor);
+		usb_unlink_urb(scn->scn_irq);
 	}
+
+	if (scn)
+		kobject_put(&scn->kobj);
 }
 
 /* we want to look at all devices, as the vendor/product id can change
diff -urN linux-2.5.64-bk12/drivers/usb/image/scanner.h linux-2.5.65/drivers/usb/image/scanner.h
--- linux-2.5.64-bk12/drivers/usb/image/scanner.h	Tue Mar  4 19:29:16 2003
+++ linux-2.5.65/drivers/usb/image/scanner.h	Mon Mar 31 12:38:41 2003
@@ -1,5 +1,5 @@
 /*
- * Driver for USB Scanners (linux-2.5.64)
+ * Driver for USB Scanners (linux-2.5)
  *
  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
  * Previously maintained by Brian Beattie
@@ -335,7 +335,9 @@
 	wait_queue_head_t rd_wait_q; /* read timeouts */
 	struct semaphore sem; /* lock to prevent concurrent reads or writes */
 	unsigned int rd_nak_timeout; /* Seconds to wait before read() timeout. */
+	struct kobject kobj;	/* Handles our reference counting */
 };
+#define to_scanner(d) container_of(d, struct scn_usb_data, kobj)
 
 extern devfs_handle_t usb_devfs_handle;
 
diff -urN linux-2.5.64-bk12/drivers/usb/input/hid-core.c linux-2.5.65/drivers/usb/input/hid-core.c
--- linux-2.5.64-bk12/drivers/usb/input/hid-core.c	Tue Mar  4 19:29:23 2003
+++ linux-2.5.65/drivers/usb/input/hid-core.c	Mon Mar 31 12:38:41 2003
@@ -954,7 +954,7 @@
 
 /*
  * Set a field value. The report this field belongs to has to be
- * created and transfered to the device, to set this value in the
+ * created and transferred to the device, to set this value in the
  * device.
  */
 
diff -urN linux-2.5.64-bk12/drivers/usb/input/hid-input.c linux-2.5.65/drivers/usb/input/hid-input.c
--- linux-2.5.64-bk12/drivers/usb/input/hid-input.c	Tue Mar  4 19:29:17 2003
+++ linux-2.5.65/drivers/usb/input/hid-input.c	Mon Mar 31 12:38:41 2003
@@ -480,7 +480,7 @@
 /*
  * Register the input device; print a message.
  * Configure the input layer interface
- * Read all reports and initalize the absoulte field values.
+ * Read all reports and initialize the absolute field values.
  */
 
 int hidinput_connect(struct hid_device *hid)
diff -urN linux-2.5.64-bk12/drivers/usb/input/hid.h linux-2.5.65/drivers/usb/input/hid.h
--- linux-2.5.64-bk12/drivers/usb/input/hid.h	Tue Mar  4 19:28:53 2003
+++ linux-2.5.65/drivers/usb/input/hid.h	Mon Mar 31 12:38:41 2003
@@ -209,8 +209,8 @@
 #define HID_QUIRK_BADPAD        0x20
 
 /*
- * This is the global enviroment of the parser. This information is
- * persistent for main-items. The global enviroment can be saved and
+ * This is the global environment of the parser. This information is
+ * persistent for main-items. The global environment can be saved and
  * restored with PUSH/POP statements.
  */
 
@@ -228,7 +228,7 @@
 };
 
 /*
- * This is the local enviroment. It is resistent up the next main-item.
+ * This is the local environment. It is persistent up the next main-item.
  */
 
 #define HID_MAX_DESCRIPTOR_SIZE		4096
diff -urN linux-2.5.64-bk12/drivers/usb/media/dsbr100.c linux-2.5.65/drivers/usb/media/dsbr100.c
--- linux-2.5.64-bk12/drivers/usb/media/dsbr100.c	Tue Mar  4 19:29:16 2003
+++ linux-2.5.65/drivers/usb/media/dsbr100.c	Mon Mar 31 12:38:41 2003
@@ -33,6 +33,12 @@
 
  History:
 
+ Version 0.30:
+ 	Markus: Updates for 2.5.x kernel and more ISO compiant source
+
+ Version 0.25:
+        PSL and Markus: Cleanup, radio now doesn't stop on device close
+
  Version 0.24:
  	Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally
 	right.  Some minor cleanup, improved standalone compilation
@@ -69,15 +75,22 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.24"
+#define DRIVER_VERSION "v0.25"
 #define DRIVER_AUTHOR "Markus Demleitner <msdemlei@tucana.harvard.edu>"
-#define DRIVER_DESC "D-Link DSB-R100 USB radio driver"
+#define DRIVER_DESC "D-Link DSB-R100 USB FM radio driver"
 
 #define DSB100_VENDOR 0x04b4
 #define DSB100_PRODUCT 0x1002
 
 #define TB_LEN 16
 
+/* Frequency limits in MHz -- these are European values.  For Japanese
+devices, that would be 76 and 91.  */
+#define FREQ_MIN  87.5
+#define FREQ_MAX 108.0
+#define FREQ_MUL 16000
+
+
 static int usb_dsbr100_probe(struct usb_interface *intf,
 			     const struct usb_device_id *id);
 static void usb_dsbr100_disconnect(struct usb_interface *intf);
@@ -108,7 +121,7 @@
 static struct video_device usb_dsbr100_radio=
 {
 	.owner =	THIS_MODULE,
-	.name =		"D-Link DSB R-100 USB radio",
+	.name =		"D-Link DSB-R 100",
 	.type =		VID_TYPE_TUNER,
 	.hardware =	VID_HARDWARE_AZTECH,
 	.fops =         &usb_dsbr100_fops,
@@ -189,7 +202,7 @@
 		return -ENOMEM;
 	usb_dsbr100_radio.priv = radio;
 	radio->dev = interface_to_usbdev (intf);
-	radio->curfreq = 1454000;
+	radio->curfreq = FREQ_MIN*FREQ_MUL;
 	usb_set_intfdata (intf, radio);
 	return 0;
 }
@@ -225,11 +238,11 @@
 	{
 		case VIDIOCGCAP: {
 			struct video_capability *v = arg;
-			memset(v,0,sizeof(*v));
-			v->type=VID_TYPE_TUNER;
-			v->channels=1;
-			v->audios=1;
-			strcpy(v->name, "D-Link R-100 USB Radio");
+			memset(v, 0, sizeof(*v));
+			v->type = VID_TYPE_TUNER;
+			v->channels = 1;
+			v->audios = 1;
+			strcpy(v->name, "D-Link R-100 USB FM Radio");
 			return 0;
 		}
 		case VIDIOCGTUNER: {
@@ -237,8 +250,8 @@
 			dsbr100_getstat(radio);
 			if(v->tuner)	/* Only 1 tuner */ 
 				return -EINVAL;
-			v->rangelow = 87*16000;
-			v->rangehigh = 108*16000;
+			v->rangelow = FREQ_MIN*FREQ_MUL;
+			v->rangehigh = FREQ_MAX*FREQ_MUL;
 			v->flags = VIDEO_TUNER_LOW;
 			v->mode = VIDEO_MODE_AUTO;
 			v->signal = radio->stereo*0x7000;
@@ -268,31 +281,31 @@
 
 			radio->curfreq = *freq;
 			if (dsbr100_setfreq(radio, radio->curfreq)==-1)
-				warn("set frequency failed");
+				warn("Set frequency failed");
 			return 0;
 		}
 		case VIDIOCGAUDIO: {
 			struct video_audio *v = arg;
-			memset(v,0, sizeof(*v));
-			v->flags|=VIDEO_AUDIO_MUTABLE;
-			v->mode=VIDEO_SOUND_STEREO;
-			v->volume=1;
-			v->step=1;
+			memset(v, 0, sizeof(*v));
+			v->flags |= VIDEO_AUDIO_MUTABLE;
+			v->mode = VIDEO_SOUND_STEREO;
+			v->volume = 1;
+			v->step = 1;
 			strcpy(v->name, "Radio");
 			return 0;			
 		}
 		case VIDIOCSAUDIO: {
 			struct video_audio *v = arg;
-			if(v->audio) 
+			if (v->audio) 
 				return -EINVAL;
 
-			if(v->flags&VIDEO_AUDIO_MUTE) {
+			if (v->flags&VIDEO_AUDIO_MUTE) {
 				if (dsbr100_stop(radio)==-1)
-					warn("radio did not respond properly");
+					warn("Radio did not respond properly");
 			}
 			else
 				if (dsbr100_start(radio)==-1)
-					warn("radio did not respond properly");
+					warn("Radio did not respond properly");
 			return 0;
 		}
 		default:
@@ -312,18 +325,18 @@
 	usb_dsbr100 *radio=dev->priv;
 
 	if (! radio) {
-		warn("radio not initialised");
+		warn("Radio not initialised");
 		return -EAGAIN;
 	}
 	if(users)
 	{
-		warn("radio in use");
+		warn("Radio in use");
 		return -EBUSY;
 	}
 	users++;
 	if (dsbr100_start(radio)<0)
-		warn("radio did not start up properly");
-	dsbr100_setfreq(radio,radio->curfreq);
+		warn("Radio did not start up properly");
+	dsbr100_setfreq(radio, radio->curfreq);
 	return 0;
 }
 
@@ -335,7 +348,6 @@
 	if (!radio)
 		return -ENODEV;
 	users--;
-	dsbr100_stop(radio);
 	return 0;
 }
 
@@ -343,8 +355,9 @@
 {
 	usb_dsbr100_radio.priv = NULL;
 	usb_register(&usb_dsbr100_driver);
-	if (video_register_device(&usb_dsbr100_radio,VFL_TYPE_RADIO,radio_nr)==-1) {	
-		warn("couldn't register video device");
+	if (video_register_device(&usb_dsbr100_radio, VFL_TYPE_RADIO,
+		radio_nr)==-1) {	
+		warn("Couldn't register video device");
 		return -EINVAL;
 	}
 	info(DRIVER_VERSION ":" DRIVER_DESC);
@@ -367,9 +380,3 @@
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE("GPL");
-
-/*
-vi: ts=8
-Sigh.  Of course, I am one of the ts=2 heretics, but Linus' wish is
-my command.
-*/
diff -urN linux-2.5.64-bk12/drivers/usb/media/konicawc.c linux-2.5.65/drivers/usb/media/konicawc.c
--- linux-2.5.64-bk12/drivers/usb/media/konicawc.c	Tue Mar  4 19:28:53 2003
+++ linux-2.5.65/drivers/usb/media/konicawc.c	Mon Mar 31 12:38:41 2003
@@ -65,7 +65,7 @@
 #endif
 
 
-/* Some default values for inital camera settings,
+/* Some default values for initial camera settings,
    can be set by modprobe */
 
 static enum frame_sizes size;	
diff -urN linux-2.5.64-bk12/drivers/usb/media/pwc-ctrl.c linux-2.5.65/drivers/usb/media/pwc-ctrl.c
--- linux-2.5.64-bk12/drivers/usb/media/pwc-ctrl.c	Tue Mar  4 19:29:52 2003
+++ linux-2.5.65/drivers/usb/media/pwc-ctrl.c	Mon Mar 31 12:38:41 2003
@@ -129,7 +129,7 @@
      4 compression modi: none, low, medium, high
      
    When an uncompressed mode is not available, the next available compressed mode 
-   will be choosen (unless the decompressor is absent). Sometimes there are only
+   will be chosen (unless the decompressor is absent). Sometimes there are only
    1 or 2 compressed modes available; in that case entries are duplicated.
 */
 struct Timon_table_entry 
diff -urN linux-2.5.64-bk12/drivers/usb/media/pwc-if.c linux-2.5.65/drivers/usb/media/pwc-if.c
--- linux-2.5.64-bk12/drivers/usb/media/pwc-if.c	Tue Mar  4 19:29:32 2003
+++ linux-2.5.65/drivers/usb/media/pwc-if.c	Mon Mar 31 12:38:41 2003
@@ -255,7 +255,7 @@
 		return -ENXIO;
 	}
 #endif	
-	/* Allocate Isochronuous pipe buffers */
+	/* Allocate Isochronous pipe buffers */
 	for (i = 0; i < MAX_ISO_BUFS; i++) {
 		if (pdev->sbuf[i].data == NULL) {
 			kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL);
@@ -811,7 +811,7 @@
 	
 	if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) {
 		Err("Failed to find packet size for video endpoint in current alternate setting.\n");
-		return -ENFILE; /* Odd error, that should be noticable */
+		return -ENFILE; /* Odd error, that should be noticeable */
 	}
 
 	/* Set alternate interface */
@@ -2040,7 +2040,7 @@
 	if (leds[1] >= 0)
 		led_off = leds[1];
 
-	/* Big device node whoopla. Basicly, it allows you to assign a 
+	/* Big device node whoopla. Basically, it allows you to assign a 
 	   device node (/dev/videoX) to a camera, based on its type 
 	   & serial number. The format is [type[.serialnumber]:]node.
 
diff -urN linux-2.5.64-bk12/drivers/usb/media/pwc-uncompress.c linux-2.5.65/drivers/usb/media/pwc-uncompress.c
--- linux-2.5.64-bk12/drivers/usb/media/pwc-uncompress.c	Tue Mar  4 19:29:20 2003
+++ linux-2.5.65/drivers/usb/media/pwc-uncompress.c	Mon Mar 31 12:38:41 2003
@@ -32,7 +32,7 @@
 
 /* Should the pwc_decompress structure ever change, we increase the 
    version number so that we don't get nasty surprises, or can 
-   dynamicly adjust our structure.
+   dynamically adjust our structure.
  */
 const int pwc_decompressor_version = PWC_MAJOR;
 
diff -urN linux-2.5.64-bk12/drivers/usb/media/pwc.h linux-2.5.65/drivers/usb/media/pwc.h
--- linux-2.5.64-bk12/drivers/usb/media/pwc.h	Tue Mar  4 19:29:24 2003
+++ linux-2.5.65/drivers/usb/media/pwc.h	Mon Mar 31 12:38:41 2003
@@ -147,7 +147,7 @@
       2. data is synchronized and packed into a frame buffer
       3a. in case data is compressed, decompress it directly into image buffer
       3b. in case data is uncompressed, copy into image buffer with viewport
-      4. data is transfered to the user process
+      4. data is transferred to the user process
 
       Note that MAX_ISO_BUFS != MAX_FRAMES != MAX_IMAGES.... 
       We have in effect a back-to-back-double-buffer system.
diff -urN linux-2.5.64-bk12/drivers/usb/media/se401.c linux-2.5.65/drivers/usb/media/se401.c
--- linux-2.5.64-bk12/drivers/usb/media/se401.c	Tue Mar  4 19:29:04 2003
+++ linux-2.5.65/drivers/usb/media/se401.c	Mon Mar 31 12:38:41 2003
@@ -692,7 +692,7 @@
 /*
 	This shouldn't really be done in a v4l driver....
 	But it does make the image look a lot more usable.
-	Basicly it lifts the dark pixels more than the light pixels.
+	Basically it lifts the dark pixels more than the light pixels.
 */
 static inline void enhance_picture(unsigned char *frame, int len)
 {
diff -urN linux-2.5.64-bk12/drivers/usb/media/vicam.c linux-2.5.65/drivers/usb/media/vicam.c
--- linux-2.5.64-bk12/drivers/usb/media/vicam.c	Tue Mar  4 19:29:15 2003
+++ linux-2.5.65/drivers/usb/media/vicam.c	Mon Mar 31 12:38:41 2003
@@ -531,7 +531,7 @@
 		return -ENODEV;
 
 	switch (ioctlnr) {
-		/* query capabilites */
+		/* query capabilities */
 	case VIDIOCGCAP:
 		{
 			struct video_capability b;
diff -urN linux-2.5.64-bk12/drivers/usb/misc/auerswald.c linux-2.5.65/drivers/usb/misc/auerswald.c
--- linux-2.5.64-bk12/drivers/usb/misc/auerswald.c	Tue Mar  4 19:29:17 2003
+++ linux-2.5.65/drivers/usb/misc/auerswald.c	Mon Mar 31 12:38:41 2003
@@ -687,10 +687,10 @@
    This function sends a simple control message to a specified endpoint
    and waits for the message to complete, or timeout.
 
-   If successful, it returns the transfered length, othwise a negative error number.
+   If successful, it returns the transferred length, otherwise a negative error number.
 
    Don't use this function from within an interrupt context, like a
-   bottom half handler.  If you need a asyncronous message, or need to send
+   bottom half handler.  If you need an asynchronous message, or need to send
    a message from within interrupt context, use auerchain_submit_urb()
 */
 static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
@@ -814,7 +814,7 @@
         }
         return 0;
 
-bl_fail:/* not enought memory. Free allocated elements */
+bl_fail:/* not enough memory. Free allocated elements */
         dbg ("auerbuf_setup: no more memory");
         auerbuf_free_buffers (bcp);
         return -ENOMEM;
@@ -1083,7 +1083,7 @@
                 /* can we do something more?
 		   This is a big problem: if this int packet is ignored, the
 		   device will wait forever and not signal any more data.
-		   The only real solution is: having enought buffers!
+		   The only real solution is: having enough buffers!
 		   Or perhaps temporary disabling the int endpoint?
 		*/
 		goto exit;
@@ -1130,7 +1130,7 @@
 }
 
 /* This function is called to activate the interrupt
-   endpoint. This function returns 0 if successfull or an error code.
+   endpoint. This function returns 0 if successful or an error code.
    NOTE: no mutex please!
 */
 static int auerswald_int_open (pauerswald_t cp)
@@ -1181,7 +1181,7 @@
 }
 
 /* This function is called to deactivate the interrupt
-   endpoint. This function returns 0 if successfull or an error code.
+   endpoint. This function returns 0 if successful or an error code.
    NOTE: no mutex please!
 */
 static int auerswald_int_release (pauerswald_t cp)
@@ -1713,7 +1713,7 @@
 		return -ERESTARTSYS;
 	}
 
-	/* try to read the incomming data again */
+	/* try to read the incoming data again */
 	goto doreadlist;
 }
 
@@ -2075,7 +2075,7 @@
    The argument  dev specifies the device context and the  driver_context
    returns a pointer to the previously registered  driver_context of the
    probe function. After returning from the disconnect function the USB
-   framework completly deallocates all data structures associated with
+   framework completely deallocates all data structures associated with
    this device. So especially the usb_device structure must not be used
    any longer by the usb driver.
 */
diff -urN linux-2.5.64-bk12/drivers/usb/misc/speedtouch.c linux-2.5.65/drivers/usb/misc/speedtouch.c
--- linux-2.5.64-bk12/drivers/usb/misc/speedtouch.c	Tue Mar  4 19:29:55 2003
+++ linux-2.5.65/drivers/usb/misc/speedtouch.c	Mon Mar 31 12:38:41 2003
@@ -193,7 +193,7 @@
 static const char udsl_driver_name [] = "speedtch";
 
 /*
- * atm driver prototypes and stuctures
+ * atm driver prototypes and structures
  */
 
 static void udsl_atm_dev_close (struct atm_dev *dev);
@@ -273,39 +273,60 @@
 	ctrl->aal5_trailer [7] = crc;
 }
 
-static char *udsl_write_cell (struct sk_buff *skb, char *target) {
+unsigned int udsl_write_cells (unsigned int howmany, struct sk_buff *skb, unsigned char **target_p) {
 	struct udsl_control *ctrl = UDSL_SKB (skb);
+	unsigned char *target = *target_p;
+	unsigned int nc, ne, i;
 
-	ctrl->num_cells--;
+	dbg ("udsl_write_cells: howmany=%u, skb->len=%d, num_cells=%u, num_entire=%u, pdu_padding=%u", howmany, skb->len, ctrl->num_cells, ctrl->num_entire, ctrl->pdu_padding);
 
-	memcpy (target, ctrl->cell_header, ATM_CELL_HEADER);
-	target += ATM_CELL_HEADER;
+	nc = ctrl->num_cells;
+	ne = min (howmany, ctrl->num_entire);
 
-	if (ctrl->num_entire) {
-		ctrl->num_entire--;
+	for (i = 0; i < ne; i++) {
+		memcpy (target, ctrl->cell_header, ATM_CELL_HEADER);
+		target += ATM_CELL_HEADER;
 		memcpy (target, skb->data, ATM_CELL_PAYLOAD);
 		target += ATM_CELL_PAYLOAD;
 		__skb_pull (skb, ATM_CELL_PAYLOAD);
-		return target;
 	}
 
+	ctrl->num_entire -= ne;
+
+	if (!(ctrl->num_cells -= ne) || !(howmany -= ne))
+		goto out;
+
+	memcpy (target, ctrl->cell_header, ATM_CELL_HEADER);
+	target += ATM_CELL_HEADER;
 	memcpy (target, skb->data, skb->len);
 	target += skb->len;
 	__skb_pull (skb, skb->len);
-
 	memset (target, 0, ctrl->pdu_padding);
 	target += ctrl->pdu_padding;
 
-	if (ctrl->num_cells) {
-		ctrl->pdu_padding = ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
-	} else {
-		memcpy (target, ctrl->aal5_trailer, ATM_AAL5_TRAILER);
-		target += ATM_AAL5_TRAILER;
-		/* set pti bit in last cell */
-		*(target + 3 - ATM_CELL_SIZE) |= 0x2;
+	if (--ctrl->num_cells) {
+		if (!--howmany) {
+			ctrl->pdu_padding = ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
+			goto out;
+		}
+
+		memcpy (target, ctrl->cell_header, ATM_CELL_HEADER);
+		target += ATM_CELL_HEADER;
+		memset (target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
+		target += ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
+
+		if (--ctrl->num_cells)
+			BUG();
 	}
 
-	return target;
+	memcpy (target, ctrl->aal5_trailer, ATM_AAL5_TRAILER);
+	target += ATM_AAL5_TRAILER;
+	/* set pti bit in last cell */
+	*(target + 3 - ATM_CELL_SIZE) |= 0x2;
+
+out:
+	*target_p = target;
+	return nc - ctrl->num_cells;
 }
 
 
@@ -500,14 +521,12 @@
 static void udsl_process_send (unsigned long data)
 {
 	struct udsl_send_buffer *buf;
-	unsigned int cells_to_write;
 	int err;
 	unsigned long flags;
-	unsigned int i;
 	struct udsl_instance_data *instance = (struct udsl_instance_data *) data;
+	unsigned int num_written;
 	struct sk_buff *skb;
 	struct udsl_sender *snd;
-	unsigned char *target;
 
 	dbg ("udsl_process_send entered");
 
@@ -577,16 +596,11 @@
 		instance->current_buffer = buf;
 	}
 
-	cells_to_write = min (buf->free_cells, UDSL_SKB (skb)->num_cells);
-	target = buf->free_start;
-
-	dbg ("writing %u cells from skb 0x%p to buffer 0x%p", cells_to_write, skb, buf);
+	num_written = udsl_write_cells (buf->free_cells, skb, &buf->free_start);
 
-	for (i = 0; i < cells_to_write; i++)
-		target = udsl_write_cell (skb, target);
+	dbg ("wrote %u cells from skb 0x%p to buffer 0x%p", num_written, skb, buf);
 
-	buf->free_start = target;
-	if (!(buf->free_cells -= cells_to_write)) {
+	if (!(buf->free_cells -= num_written)) {
 		list_add_tail (&buf->list, &instance->filled_buffers);
 		instance->current_buffer = NULL;
 		dbg ("queued filled buffer");
diff -urN linux-2.5.64-bk12/drivers/usb/net/usbnet.c linux-2.5.65/drivers/usb/net/usbnet.c
--- linux-2.5.64-bk12/drivers/usb/net/usbnet.c	Tue Mar  4 19:29:21 2003
+++ linux-2.5.65/drivers/usb/net/usbnet.c	Mon Mar 31 12:38:41 2003
@@ -1707,7 +1707,7 @@
 
 /*-------------------------------------------------------------------------*/
 
-// posts reads, and enables write queing
+// posts reads, and enables write queuing
 
 // precondition: never called in_interrupt
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/belkin_sa.c linux-2.5.65/drivers/usb/serial/belkin_sa.c
--- linux-2.5.64-bk12/drivers/usb/serial/belkin_sa.c	Tue Mar  4 19:29:23 2003
+++ linux-2.5.65/drivers/usb/serial/belkin_sa.c	Mon Mar 31 12:38:41 2003
@@ -215,7 +215,7 @@
 	dbg("%s port %d", __FUNCTION__, port->number);
 
 	/*Start reading from the device*/
-	/* TODO: Look at possibility of submitting mulitple URBs to device to
+	/* TODO: Look at possibility of submitting multiple URBs to device to
 	 *       enhance buffering.  Win trace shows 16 initial read URBs.
 	 */
 	port->read_urb->dev = port->serial->dev;
diff -urN linux-2.5.64-bk12/drivers/usb/serial/cyberjack.c linux-2.5.65/drivers/usb/serial/cyberjack.c
--- linux-2.5.64-bk12/drivers/usb/serial/cyberjack.c	Tue Mar  4 19:29:36 2003
+++ linux-2.5.65/drivers/usb/serial/cyberjack.c	Mon Mar 31 12:38:41 2003
@@ -302,7 +302,7 @@
 		short old_rdtodo = priv->rdtodo;
 		int result;
 
-		/* This is a announcement of comming bulk_ins. */
+		/* This is a announcement of coming bulk_ins. */
 		unsigned short size = ((unsigned short)data[3]<<8)+data[2]+3;
 
 		if( (size>259) || (size==0) ) {
diff -urN linux-2.5.64-bk12/drivers/usb/serial/io_edgeport.c linux-2.5.65/drivers/usb/serial/io_edgeport.c
--- linux-2.5.64-bk12/drivers/usb/serial/io_edgeport.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/serial/io_edgeport.c	Mon Mar 31 12:38:41 2003
@@ -1086,7 +1086,7 @@
 		return -ENODEV;
 	}
 
-	/* now wait for the port to be completly opened */
+	/* now wait for the port to be completely opened */
 	timeout = OPEN_TIMEOUT;
 	while (timeout && edge_port->openPending == TRUE) {
 		timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
diff -urN linux-2.5.64-bk12/drivers/usb/serial/io_ionsp.h linux-2.5.65/drivers/usb/serial/io_ionsp.h
--- linux-2.5.64-bk12/drivers/usb/serial/io_ionsp.h	Tue Mar  4 19:29:33 2003
+++ linux-2.5.65/drivers/usb/serial/io_ionsp.h	Mon Mar 31 12:38:41 2003
@@ -19,7 +19,7 @@
 The data to and from all ports on the peripheral is multiplexed
 through a single endpoint pair (EP1 since it supports 64-byte
 MaxPacketSize). Therefore, the data, commands, and status for
-each port must be preceeded by a short header identifying the
+each port must be preceded by a short header identifying the
 destination port. The header also identifies the bytes that follow
 as data or as command/status info.
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/io_ti.c linux-2.5.65/drivers/usb/serial/io_ti.c
--- linux-2.5.64-bk12/drivers/usb/serial/io_ti.c	Tue Mar  4 19:29:53 2003
+++ linux-2.5.65/drivers/usb/serial/io_ti.c	Mon Mar 31 12:38:41 2003
@@ -468,7 +468,7 @@
 {
 	int status;
 	struct out_endpoint_desc_block *oedb;
-	__u8 lsr;
+	__u8 *lsr;
 	int bytes_left = 0;
 
 	oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
@@ -477,6 +477,13 @@
 		return -ENOMEM;
 	}
 
+	lsr = kmalloc (1, GFP_KERNEL);	/* Sigh, that's right, just one byte,
+					   as not all platforms can do DMA
+					   from stack */
+	if (!lsr) {
+		kfree(oedb);
+		return -ENOMEM;
+	}
 	/* Read the DMA Count Registers */
 	status = TIReadRam (port->port->serial->dev,
 			    port->dma_address,
@@ -492,22 +499,25 @@
 	status = TIReadRam (port->port->serial->dev, 
 			    port->uart_base + UMPMEM_OFFS_UART_LSR,
 			    1,
-			    &lsr);
+			    lsr);
 
 	if (status)
 		goto exit_is_tx_active;
-	dbg ("%s - LSR = 0x%X", __FUNCTION__, lsr);
+	dbg ("%s - LSR = 0x%X", __FUNCTION__, *lsr);
 	
 	/* If either buffer has data or we are transmitting then return TRUE */
 	if ((oedb->XByteCount & 0x80 ) != 0 )
 		bytes_left += 64;
 
-	if ((lsr & UMP_UART_LSR_TX_MASK ) == 0 )
+	if ((*lsr & UMP_UART_LSR_TX_MASK ) == 0 )
 		bytes_left += 1;
 
 	/* We return Not Active if we get any kind of error */
 exit_is_tx_active:
 	dbg ("%s - return %d", __FUNCTION__, bytes_left );
+
+	kfree(lsr);
+	kfree(oedb);
 	return bytes_left;
 }
 
@@ -1151,8 +1161,12 @@
 				dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status);
 
 				/* return an error on purpose. */
+				kfree (firmware_version);
+				kfree (rom_desc);
+				kfree (ti_manuf_desc);
 				return -ENODEV;
 			}
+			kfree (firmware_version);
 		}
 		// Search for type 0xF2 record (firmware blank record)
 		else if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc)) != 0) {
diff -urN linux-2.5.64-bk12/drivers/usb/serial/ir-usb.c linux-2.5.65/drivers/usb/serial/ir-usb.c
--- linux-2.5.64-bk12/drivers/usb/serial/ir-usb.c	Tue Mar  4 19:29:18 2003
+++ linux-2.5.65/drivers/usb/serial/ir-usb.c	Mon Mar 31 12:38:41 2003
@@ -471,7 +471,7 @@
 
 			/*
 			 * Bypass flip-buffers, and feed the ldisc directly
-			 * due to our potentally large buffer size.  Since we
+			 * due to our potentially large buffer size.  Since we
 			 * used to set low_latency, this is exactly what the
 			 * tty layer did anyway :)
 			 */
@@ -553,7 +553,7 @@
 		/* 
 		 * FIXME, we should compare the baud request against the
 		 * capability stated in the IR header that we got in the
-		 * startup funtion.
+		 * startup function.
 		 */
 		switch (cflag & CBAUD) {
 			case B2400:    ir_baud = SPEED_2400;    break;
diff -urN linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa26msg.h linux-2.5.65/drivers/usb/serial/keyspan_usa26msg.h
--- linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa26msg.h	Tue Mar  4 19:29:22 2003
+++ linux-2.5.65/drivers/usb/serial/keyspan_usa26msg.h	Mon Mar 31 12:38:41 2003
@@ -23,7 +23,7 @@
    	notice, this list of conditions and the following disclaimer in the
    	documentation and/or other materials provided with the distribution.
 
-	3. The name of InnoSys Incorprated may not be used to endorse or promote
+	3. The name of InnoSys Incorporated may not be used to endorse or promote
    	products derived from this software without specific prior written
    	permission.
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa28msg.h linux-2.5.65/drivers/usb/serial/keyspan_usa28msg.h
--- linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa28msg.h	Tue Mar  4 19:28:58 2003
+++ linux-2.5.65/drivers/usb/serial/keyspan_usa28msg.h	Mon Mar 31 12:38:41 2003
@@ -23,7 +23,7 @@
    	notice, this list of conditions and the following disclaimer in the
    	documentation and/or other materials provided with the distribution.
 
-	3. The name of InnoSys Incorprated may not be used to endorse or promote
+	3. The name of InnoSys Incorporated may not be used to endorse or promote
    	products derived from this software without specific prior written
    	permission.
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa49msg.h linux-2.5.65/drivers/usb/serial/keyspan_usa49msg.h
--- linux-2.5.64-bk12/drivers/usb/serial/keyspan_usa49msg.h	Tue Mar  4 19:29:02 2003
+++ linux-2.5.65/drivers/usb/serial/keyspan_usa49msg.h	Mon Mar 31 12:38:41 2003
@@ -23,7 +23,7 @@
    	notice, this list of conditions and the following disclaimer in the
    	documentation and/or other materials provided with the distribution.
 
-	3. The name of InnoSys Incorprated may not be used to endorse or promote
+	3. The name of InnoSys Incorporated may not be used to endorse or promote
    	products derived from this software without specific prior written
    	permission.
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/kobil_sct.c linux-2.5.65/drivers/usb/serial/kobil_sct.c
--- linux-2.5.64-bk12/drivers/usb/serial/kobil_sct.c	Tue Mar  4 19:29:34 2003
+++ linux-2.5.65/drivers/usb/serial/kobil_sct.c	Mon Mar 31 12:38:41 2003
@@ -253,6 +253,7 @@
 		port->write_urb = usb_alloc_urb(0, GFP_KERNEL);  
 		if (!port->write_urb) {
 			dbg("%s - port %d usb_alloc_urb failed", __FUNCTION__, port->number);
+			kfree(transfer_buffer);
 			return -1;
 		}
 	}
@@ -260,6 +261,7 @@
 	// allocate memory for write_urb transfer buffer
 	port->write_urb->transfer_buffer = (unsigned char *) kmalloc(write_urb_transfer_buffer_length, GFP_KERNEL);
 	if (! port->write_urb->transfer_buffer) {
+		kfree(transfer_buffer);
 		return -1;
 	} 
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/pl2303.c linux-2.5.65/drivers/usb/serial/pl2303.c
--- linux-2.5.64-bk12/drivers/usb/serial/pl2303.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/serial/pl2303.c	Mon Mar 31 12:38:41 2003
@@ -76,6 +76,7 @@
 	{ USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) },
 	{ USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
 	{ USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
+	{ USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
 	{ }					/* Terminating entry */
 };
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/pl2303.h linux-2.5.65/drivers/usb/serial/pl2303.h
--- linux-2.5.64-bk12/drivers/usb/serial/pl2303.h	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/serial/pl2303.h	Mon Mar 31 12:38:41 2003
@@ -34,3 +34,6 @@
 
 #define RADIOSHACK_VENDOR_ID	0x1453
 #define RADIOSHACK_PRODUCT_ID	0x4026
+
+#define DCU10_VENDOR_ID		0x0731
+#define DCU10_PRODUCT_ID	0x0528
diff -urN linux-2.5.64-bk12/drivers/usb/serial/usb-serial.c linux-2.5.65/drivers/usb/serial/usb-serial.c
--- linux-2.5.64-bk12/drivers/usb/serial/usb-serial.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/serial/usb-serial.c	Mon Mar 31 12:38:41 2003
@@ -229,7 +229,7 @@
  * (01/23/2000) gkh
  *	Fixed problem of crash when trying to open a port that didn't have a
  *	device assigned to it. Made the minor node finding a little smarter,
- *	now it looks to find a continous space for the new device.
+ *	now it looks to find a continuous space for the new device.
  *
  * (01/21/2000) gkh
  *	Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net)
@@ -1293,7 +1293,7 @@
 	int i;
 	int result = 0;
 
-	/* Initalize our global data */
+	/* Initialize our global data */
 	for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
 		serial_table[i] = NULL;
 	}
diff -urN linux-2.5.64-bk12/drivers/usb/serial/usb-serial.h linux-2.5.65/drivers/usb/serial/usb-serial.h
--- linux-2.5.64-bk12/drivers/usb/serial/usb-serial.h	Tue Mar  4 19:29:57 2003
+++ linux-2.5.65/drivers/usb/serial/usb-serial.h	Mon Mar 31 12:38:41 2003
@@ -71,7 +71,7 @@
  * usb_serial_port: structure for the specific ports of a device.
  * @magic: magic number for internal validity of this pointer.
  * @serial: pointer back to the struct usb_serial owner of this port.
- * @tty: pointer to the coresponding tty for this port.
+ * @tty: pointer to the corresponding tty for this port.
  * @number: the number of the port (the minor number).
  * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
  * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
diff -urN linux-2.5.64-bk12/drivers/usb/serial/visor.c linux-2.5.65/drivers/usb/serial/visor.c
--- linux-2.5.64-bk12/drivers/usb/serial/visor.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/drivers/usb/serial/visor.c	Mon Mar 31 12:38:41 2003
@@ -12,6 +12,10 @@
  *
  * See Documentation/usb/usb-serial.txt for more information on using this driver
  *
+ * (03/09/2003) gkh
+ *	Added support for the Sony Clie NZ90V device.  Thanks to Martin Brachtl
+ *	<brachtl@redgrep.cz> for the information.
+ *
  * (03/05/2003) gkh
  *	Think Treo support is now working.
  *
@@ -198,6 +202,8 @@
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID),
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
+	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M100_ID),
+		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID),
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID),
@@ -215,6 +221,8 @@
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID),
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
+	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NZ90V_ID),
+		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ }					/* Terminating entry */
 };
 
@@ -230,6 +238,7 @@
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
+	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M100_ID) },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_TUNGSTEN_T_ID) },
@@ -240,6 +249,7 @@
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID) },
+	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NZ90V_ID) },
 	{ }					/* Terminating entry */
 };
 
diff -urN linux-2.5.64-bk12/drivers/usb/serial/visor.h linux-2.5.65/drivers/usb/serial/visor.h
--- linux-2.5.64-bk12/drivers/usb/serial/visor.h	Tue Mar  4 19:29:33 2003
+++ linux-2.5.65/drivers/usb/serial/visor.h	Mon Mar 31 12:38:41 2003
@@ -31,6 +31,7 @@
 #define PALM_TUNGSTEN_T_ID		0x0060
 #define PALM_TUNGSTEN_Z_ID		0x0031
 #define PALM_ZIRE_ID			0x0070
+#define PALM_M100_ID			0x0080
 
 #define SONY_VENDOR_ID			0x054C
 #define SONY_CLIE_3_5_ID		0x0038
@@ -38,6 +39,7 @@
 #define SONY_CLIE_S360_ID		0x0095
 #define SONY_CLIE_4_1_ID		0x009A
 #define SONY_CLIE_NX60_ID		0x00DA
+#define SONY_CLIE_NZ90V_ID		0x00E9
 
 /****************************************************************************
  * Handspring Visor Vendor specific request codes (bRequest values)
diff -urN linux-2.5.64-bk12/drivers/usb/storage/isd200.c linux-2.5.65/drivers/usb/storage/isd200.c
--- linux-2.5.64-bk12/drivers/usb/storage/isd200.c	Tue Mar  4 19:29:18 2003
+++ linux-2.5.65/drivers/usb/storage/isd200.c	Mon Mar 31 12:38:41 2003
@@ -650,7 +650,7 @@
 /**************************************************************************
  * isd200_write_config
  *									 
- * Write the ISD200 Configuraton data
+ * Write the ISD200 Configuration data
  *
  * RETURNS:
  *    ISD status code
@@ -693,7 +693,7 @@
 /**************************************************************************
  * isd200_read_config
  *									 
- * Reads the ISD200 Configuraton data
+ * Reads the ISD200 Configuration data
  *
  * RETURNS:
  *    ISD status code
@@ -977,7 +977,7 @@
 		/* check for an ATA device */
 		if (info->DeviceFlags & DF_ATA_DEVICE) {
 			/* this must be an ATA device */
-			/* perform an ATA Commmand Identify */
+			/* perform an ATA Command Identify */
 			transferStatus = isd200_action( us, ACTION_IDENTIFY,
 							&info->drive, 
 							sizeof(struct hd_driveid) );
diff -urN linux-2.5.64-bk12/drivers/usb/storage/transport.h linux-2.5.65/drivers/usb/storage/transport.h
--- linux-2.5.64-bk12/drivers/usb/storage/transport.h	Tue Mar  4 19:29:16 2003
+++ linux-2.5.65/drivers/usb/storage/transport.h	Mon Mar 31 12:38:41 2003
@@ -118,7 +118,7 @@
  */
 
 #define USB_STOR_XFER_GOOD	0	/* good transfer                 */
-#define USB_STOR_XFER_SHORT	1	/* transfered less than expected */
+#define USB_STOR_XFER_SHORT	1	/* transferred less than expected */
 #define USB_STOR_XFER_STALLED	2	/* endpoint stalled              */
 #define USB_STOR_XFER_ERROR	3	/* transfer died in the middle   */
 
diff -urN linux-2.5.64-bk12/drivers/usb/usb-skeleton.c linux-2.5.65/drivers/usb/usb-skeleton.c
--- linux-2.5.64-bk12/drivers/usb/usb-skeleton.c	Tue Mar  4 19:29:18 2003
+++ linux-2.5.65/drivers/usb/usb-skeleton.c	Mon Mar 31 12:38:41 2003
@@ -64,7 +64,7 @@
 #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com"
 #define DRIVER_DESC "USB Skeleton Driver"
 
-/* Module paramaters */
+/* Module parameters */
 MODULE_PARM(debug, "i");
 MODULE_PARM_DESC(debug, "Debug enabled or not");
 
diff -urN linux-2.5.64-bk12/fs/affs/super.c linux-2.5.65/fs/affs/super.c
--- linux-2.5.64-bk12/fs/affs/super.c	Mon Mar 31 12:38:37 2003
+++ linux-2.5.65/fs/affs/super.c	Mon Mar 31 12:38:41 2003
@@ -298,7 +298,8 @@
 	if (!sbi)
 		return -ENOMEM;
 	sb->s_fs_info = sbi;
-	memset(sbi, 0, sizeof(*AFFS_SB));
+	memset(sbi, 0, sizeof(struct affs_sb_info));
+
 	init_MUTEX(&sbi->s_bmlock);
 
 	if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
diff -urN linux-2.5.64-bk12/include/linux/amigaffs.h linux-2.5.65/include/linux/amigaffs.h
--- linux-2.5.64-bk12/include/linux/amigaffs.h	Tue Mar  4 19:29:01 2003
+++ linux-2.5.65/include/linux/amigaffs.h	Mon Mar 31 12:38:42 2003
@@ -73,7 +73,7 @@
 affs_brelse(struct buffer_head *bh)
 {
 	if (bh)
-		pr_debug("affs_brelse: %ld\n", bh->b_blocknr);
+		pr_debug("affs_brelse: %lld\n", (long long) bh->b_blocknr);
 	brelse(bh);
 }
 
diff -urN linux-2.5.64-bk12/kernel/signal.c linux-2.5.65/kernel/signal.c
--- linux-2.5.64-bk12/kernel/signal.c	Tue Mar  4 19:29:16 2003
+++ linux-2.5.65/kernel/signal.c	Mon Mar 31 12:38:43 2003
@@ -1460,6 +1460,45 @@
 
 #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER
 
+/*
+ * Do appropriate magic when group_stop_count > 0.
+ * We return nonzero if we stopped, after releasing the siglock.
+ * We return zero if we still hold the siglock and should look
+ * for another signal without checking group_stop_count again.
+ */
+static inline int handle_group_stop(void)
+{
+	int stop_count;
+
+	if (current->signal->group_exit_task == current) {
+		/*
+		 * Group stop is so we can do a core dump,
+		 * We are the initiating thread, so get on with it.
+		 */
+		current->signal->group_exit_task = NULL;
+		return 0;
+	}
+
+	if (current->signal->group_exit)
+		/*
+		 * Group stop is so another thread can do a core dump,
+		 * or else we are racing against a death signal.
+		 * Just punt the stop so we can get the next signal.
+		 */
+		return 0;
+
+	/*
+	 * There is a group stop in progress.  We stop
+	 * without any associated signal being in our queue.
+	 */
+	stop_count = --current->signal->group_stop_count;
+	current->exit_code = current->signal->group_exit_code;
+	set_current_state(TASK_STOPPED);
+	spin_unlock_irq(&current->sighand->siglock);
+	finish_stop(stop_count);
+	return 1;
+}
+
 int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie)
 {
 	sigset_t *mask = &current->blocked;
@@ -1469,28 +1508,9 @@
 		struct k_sigaction *ka;
 
 		spin_lock_irq(&current->sighand->siglock);
-		if (unlikely(current->signal->group_stop_count > 0)) {
-			int stop_count;
-			if (current->signal->group_exit_task == current) {
-				/*
-				 * Group stop is so we can do a core dump.
-				 */
-				current->signal->group_exit_task = NULL;
-				goto dequeue;
-			}
-			/*
-			 * There is a group stop in progress.  We stop
-			 * without any associated signal being in our queue.
-			 */
-			stop_count = --current->signal->group_stop_count;
-			signr = current->signal->group_exit_code;
-			current->exit_code = signr;
-			set_current_state(TASK_STOPPED);
-			spin_unlock_irq(&current->sighand->siglock);
-			finish_stop(stop_count);
+		if (unlikely(current->signal->group_stop_count > 0) &&
+		    handle_group_stop())
 			continue;
-		}
-	dequeue:
 		signr = dequeue_signal(current, mask, info);
 		spin_unlock_irq(&current->sighand->siglock);
 
