Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-03-16 18:43:39 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2003-03-16 18:43:39 -0800
commitb9b40b69b9de65c6726fa2753b84955f043e7be7 (patch)
tree74f44b64684d15c1af17fc11541364b4aab9419f
parent874f2e4778535550d4cf65055bcb4003604f0e40 (diff)
parent6606cf5ebb2cd1a612f41c94301f2c611d2c6d1f (diff)
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/gregkh-2.5
-rw-r--r--drivers/usb/class/bluetty.c4
-rw-r--r--drivers/usb/class/cdc-acm.c4
-rw-r--r--drivers/usb/class/usb-midi.c2
-rw-r--r--drivers/usb/core/hub.c4
-rw-r--r--drivers/usb/core/urb.c4
-rw-r--r--drivers/usb/host/hc_simple.c2
-rw-r--r--drivers/usb/host/hc_simple.h4
-rw-r--r--drivers/usb/host/hc_sl811.h2
-rw-r--r--drivers/usb/host/ohci-q.c6
-rw-r--r--drivers/usb/host/uhci-hcd.c2
-rw-r--r--drivers/usb/image/hpusbscsi.c4
-rw-r--r--drivers/usb/image/hpusbscsi.h2
-rw-r--r--drivers/usb/image/scanner.c76
-rw-r--r--drivers/usb/image/scanner.h4
-rw-r--r--drivers/usb/input/hid-core.c2
-rw-r--r--drivers/usb/input/hid-input.c2
-rw-r--r--drivers/usb/input/hid.h6
-rw-r--r--drivers/usb/media/dsbr100.c75
-rw-r--r--drivers/usb/media/konicawc.c2
-rw-r--r--drivers/usb/media/pwc-ctrl.c2
-rw-r--r--drivers/usb/media/pwc-if.c6
-rw-r--r--drivers/usb/media/pwc-uncompress.c2
-rw-r--r--drivers/usb/media/pwc.h2
-rw-r--r--drivers/usb/media/se401.c2
-rw-r--r--drivers/usb/media/vicam.c2
-rw-r--r--drivers/usb/misc/auerswald.c16
-rw-r--r--drivers/usb/misc/speedtouch.c70
-rw-r--r--drivers/usb/net/usbnet.c2
-rw-r--r--drivers/usb/serial/belkin_sa.c2
-rw-r--r--drivers/usb/serial/cyberjack.c2
-rw-r--r--drivers/usb/serial/io_edgeport.c2
-rw-r--r--drivers/usb/serial/io_ionsp.h2
-rw-r--r--drivers/usb/serial/io_ti.c22
-rw-r--r--drivers/usb/serial/ir-usb.c4
-rw-r--r--drivers/usb/serial/keyspan_usa26msg.h2
-rw-r--r--drivers/usb/serial/keyspan_usa28msg.h2
-rw-r--r--drivers/usb/serial/keyspan_usa49msg.h2
-rw-r--r--drivers/usb/serial/kobil_sct.c2
-rw-r--r--drivers/usb/serial/pl2303.c1
-rw-r--r--drivers/usb/serial/pl2303.h3
-rw-r--r--drivers/usb/serial/usb-serial.c4
-rw-r--r--drivers/usb/serial/usb-serial.h2
-rw-r--r--drivers/usb/serial/visor.c10
-rw-r--r--drivers/usb/serial/visor.h2
-rw-r--r--drivers/usb/storage/isd200.c6
-rw-r--r--drivers/usb/storage/transport.h2
-rw-r--r--drivers/usb/usb-skeleton.c2
47 files changed, 233 insertions, 152 deletions
diff --git a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
index d7cc97c9eff1..b83068f9f13a 100644
--- a/drivers/usb/class/bluetty.c
+++ b/drivers/usb/class/bluetty.c
@@ -168,7 +168,7 @@ struct usb_bluetooth {
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 usb_bluetooth_init(void)
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 --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 5cd38d761590..7a6b3d0204e8 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -138,9 +138,9 @@ struct acm_line {
*/
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 --git a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c
index 4e6d970299da..1361485d7629 100644
--- a/drivers/usb/class/usb-midi.c
+++ b/drivers/usb/class/usb-midi.c
@@ -1270,7 +1270,7 @@ static void *find_descriptor( void *descStart, unsigned int descLength, void *af
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 --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index cd039053c127..b8f282d5524a 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -516,7 +516,7 @@ descriptor_error:
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 @@ static void usb_hub_events(void)
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 --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index a33c33b08082..8b2624844cb1 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -69,7 +69,7 @@ void usb_free_urb(struct urb *urb)
* 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 @@ int usb_unlink_urb(struct urb *urb)
{
/* 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 --git a/drivers/usb/host/hc_simple.c b/drivers/usb/host/hc_simple.c
index 5d4cf5c02971..f970656f0810 100644
--- a/drivers/usb/host/hc_simple.c
+++ b/drivers/usb/host/hc_simple.c
@@ -605,7 +605,7 @@ static struct urb *qu_return_urb (hci_t * hci, struct urb * urb, int resub_ok)
/***************************************************************************
* 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 --git a/drivers/usb/host/hc_simple.h b/drivers/usb/host/hc_simple.h
index dfb67e7d964e..d0289f62f058 100644
--- a/drivers/usb/host/hc_simple.h
+++ b/drivers/usb/host/hc_simple.h
@@ -44,8 +44,8 @@ struct virt_root_hub {
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 --git a/drivers/usb/host/hc_sl811.h b/drivers/usb/host/hc_sl811.h
index 1618d233f236..8b9eed235088 100644
--- a/drivers/usb/host/hc_sl811.h
+++ b/drivers/usb/host/hc_sl811.h
@@ -368,7 +368,7 @@ struct hci;
#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 --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index a25daa6c899f..f531767a9ecd 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -650,7 +650,7 @@ static void td_submit_urb (
/* 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 @@ rescan_this:
*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 @@ dl_done_list (struct ohci_hcd *ohci, struct td *td, struct pt_regs *regs)
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 --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index c3c0a7505765..06541479c29f 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -136,7 +136,7 @@ static inline void uhci_add_complete(struct uhci_hcd *uhci, struct urb *urb)
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 --git a/drivers/usb/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c
index 9590371e8203..1b74264ee8e5 100644
--- a/drivers/usb/image/hpusbscsi.c
+++ b/drivers/usb/image/hpusbscsi.c
@@ -303,7 +303,7 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback)
} 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 @@ DEBUG("Getting status byte %d \n",hpusbscsi->scsi_state_byte);
}
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 --git a/drivers/usb/image/hpusbscsi.h b/drivers/usb/image/hpusbscsi.h
index 6e83344dcaa9..b56f091cdd39 100644
--- a/drivers/usb/image/hpusbscsi.h
+++ b/drivers/usb/image/hpusbscsi.h
@@ -85,7 +85,7 @@ static Scsi_Host_Template hpusbscsi_scsi_host_template = {
/* 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 --git a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c
index c8d1dd5e0835..6fb7c46362d6 100644
--- a/drivers/usb/image/scanner.c
+++ b/drivers/usb/image/scanner.c
@@ -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 @@ irq_scanner(struct urb *urb, struct pt_regs *regs)
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 @@ open_scanner(struct inode * inode, struct file * file)
return -ENODEV;
}
scn = usb_get_intfdata(intf);
+ kobject_get(&scn->kobj);
dev = scn->scn_dev;
@@ -521,6 +526,8 @@ close_scanner(struct inode * inode, struct file * file)
up(&scn_mutex);
up(&(scn->sem));
+ kobject_put(&scn->kobj);
+
return 0;
}
@@ -813,6 +820,37 @@ ioctl_scanner(struct inode *inode, struct file *file,
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 @@ probe_scanner(struct usb_interface *intf,
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 @@ probe_scanner(struct usb_interface *intf,
}
+ 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 @@ disconnect_scanner(struct usb_interface *intf)
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 --git a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h
index 93be043c7a62..dc77eb090dec 100644
--- a/drivers/usb/image/scanner.h
+++ b/drivers/usb/image/scanner.h
@@ -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 @@ struct scn_usb_data {
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 --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 0b222dd524c1..4da30222593a 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -954,7 +954,7 @@ void hid_output_report(struct hid_report *report, __u8 *data)
/*
* 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 --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
index c614338be50f..da0267893d06 100644
--- a/drivers/usb/input/hid-input.c
+++ b/drivers/usb/input/hid-input.c
@@ -480,7 +480,7 @@ static void hidinput_close(struct input_dev *dev)
/*
* 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 --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 70cab1643aa7..a6081d795493 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -209,8 +209,8 @@ struct hid_item {
#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 @@ struct hid_global {
};
/*
- * 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 --git a/drivers/usb/media/dsbr100.c b/drivers/usb/media/dsbr100.c
index cc099cb8d91d..cabf38496d33 100644
--- a/drivers/usb/media/dsbr100.c
+++ b/drivers/usb/media/dsbr100.c
@@ -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 file_operations usb_dsbr100_fops = {
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 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
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 @@ static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
{
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 @@ static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
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 @@ static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
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 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
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 @@ static int usb_dsbr100_close(struct inode *inode, struct file *file)
if (!radio)
return -ENODEV;
users--;
- dsbr100_stop(radio);
return 0;
}
@@ -343,8 +355,9 @@ static int __init dsbr100_init(void)
{
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_exit (dsbr100_exit);
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 --git a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
index 90049bc8993a..b79f0e816d4d 100644
--- a/drivers/usb/media/konicawc.c
+++ b/drivers/usb/media/konicawc.c
@@ -65,7 +65,7 @@ static const int debug = 0;
#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 --git a/drivers/usb/media/pwc-ctrl.c b/drivers/usb/media/pwc-ctrl.c
index 92c5c8239913..a1af23e7b589 100644
--- a/drivers/usb/media/pwc-ctrl.c
+++ b/drivers/usb/media/pwc-ctrl.c
@@ -129,7 +129,7 @@ static struct Nala_table_entry Nala_table[PSZ_MAX][8] =
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 --git a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
index 6414b56defa4..19fe16084b90 100644
--- a/drivers/usb/media/pwc-if.c
+++ b/drivers/usb/media/pwc-if.c
@@ -255,7 +255,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
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 @@ static int pwc_isoc_init(struct pwc_device *pdev)
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 @@ static int __init usb_pwc_init(void)
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 --git a/drivers/usb/media/pwc-uncompress.c b/drivers/usb/media/pwc-uncompress.c
index b34074e5d40d..42a65168dd5d 100644
--- a/drivers/usb/media/pwc-uncompress.c
+++ b/drivers/usb/media/pwc-uncompress.c
@@ -32,7 +32,7 @@ static LIST_HEAD(pwc_decompressor_list);
/* 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 --git a/drivers/usb/media/pwc.h b/drivers/usb/media/pwc.h
index 3ff42fc9f20e..9745effa4407 100644
--- a/drivers/usb/media/pwc.h
+++ b/drivers/usb/media/pwc.h
@@ -147,7 +147,7 @@ struct pwc_device
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 --git a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c
index cde8b307a2a1..f1f3210f3a48 100644
--- a/drivers/usb/media/se401.c
+++ b/drivers/usb/media/se401.c
@@ -692,7 +692,7 @@ static int se401_set_size(struct usb_se401 *se401, int width, int height)
/*
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 --git a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c
index 831d932ea9e5..adb87516e8ab 100644
--- a/drivers/usb/media/vicam.c
+++ b/drivers/usb/media/vicam.c
@@ -531,7 +531,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign
return -ENODEV;
switch (ioctlnr) {
- /* query capabilites */
+ /* query capabilities */
case VIDIOCGCAP:
{
struct video_capability b;
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 28132e35a4a7..74ca6cacd589 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -687,10 +687,10 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
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 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned
}
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 @@ static void auerswald_int_complete (struct urb * urb, struct pt_regs *regs)
/* 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 @@ static void auerswald_int_free (pauerswald_t cp)
}
/* 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 @@ intoend:
}
/* 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 @@ doreadlist:
return -ERESTARTSYS;
}
- /* try to read the incomming data again */
+ /* try to read the incoming data again */
goto doreadlist;
}
@@ -2075,7 +2075,7 @@ pfail: auerswald_delete (cp);
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 --git a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
index 0c4ce9d19612..58bb47c64e6a 100644
--- a/drivers/usb/misc/speedtouch.c
+++ b/drivers/usb/misc/speedtouch.c
@@ -193,7 +193,7 @@ struct udsl_instance_data {
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 @@ static void udsl_groom_skb (struct atm_vcc *vcc, struct sk_buff *skb) {
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_complete_send (struct urb *urb, struct pt_regs *regs)
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 @@ made_progress:
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 --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 398aa567d6ba..fec152c2f241 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -1707,7 +1707,7 @@ static int usbnet_stop (struct net_device *net)
/*-------------------------------------------------------------------------*/
-// posts reads, and enables write queing
+// posts reads, and enables write queuing
// precondition: never called in_interrupt
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 7cf6b5847c1c..0c790ae6a4e8 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -215,7 +215,7 @@ static int belkin_sa_open (struct usb_serial_port *port, struct file *filp)
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 --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 8f6dcd730173..b0161705047e 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -302,7 +302,7 @@ static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
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 --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index af4a621ff524..37e266f52650 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -1086,7 +1086,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
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 --git a/drivers/usb/serial/io_ionsp.h b/drivers/usb/serial/io_ionsp.h
index e5c344d033ec..944fc04f1946 100644
--- a/drivers/usb/serial/io_ionsp.h
+++ b/drivers/usb/serial/io_ionsp.h
@@ -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 --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 7ba4d95425d4..b2368748b9de 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -468,7 +468,7 @@ static int TIIsTxActive (struct edgeport_port *port)
{
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 @@ static int TIIsTxActive (struct edgeport_port *port)
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 @@ static int TIIsTxActive (struct edgeport_port *port)
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 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
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 --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 9381bc4f6023..332a56327123 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -471,7 +471,7 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
/*
* 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 @@ static void ir_set_termios (struct usb_serial_port *port, struct termios *old_te
/*
* 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 --git a/drivers/usb/serial/keyspan_usa26msg.h b/drivers/usb/serial/keyspan_usa26msg.h
index d3c0cb0277b9..cac3d501f523 100644
--- a/drivers/usb/serial/keyspan_usa26msg.h
+++ b/drivers/usb/serial/keyspan_usa26msg.h
@@ -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 --git a/drivers/usb/serial/keyspan_usa28msg.h b/drivers/usb/serial/keyspan_usa28msg.h
index 4641abd7d682..d76eb72878e1 100644
--- a/drivers/usb/serial/keyspan_usa28msg.h
+++ b/drivers/usb/serial/keyspan_usa28msg.h
@@ -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 --git a/drivers/usb/serial/keyspan_usa49msg.h b/drivers/usb/serial/keyspan_usa49msg.h
index 73444c00023d..320b2cc76874 100644
--- a/drivers/usb/serial/keyspan_usa49msg.h
+++ b/drivers/usb/serial/keyspan_usa49msg.h
@@ -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 --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 69abd70e79cf..99c634017192 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -253,6 +253,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
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 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
// 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 --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 96f5c051c8e0..b341aad16a6e 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -76,6 +76,7 @@ static struct usb_device_id id_table [] = {
{ 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 --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 63051e66e69c..5e2abcc0db20 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -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 --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 6eda0113534b..c57ce2d5f31f 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -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 @@ static int __init usb_serial_init(void)
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 --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index 5389343ecaf7..ad2d292ddf53 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -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 --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index ee5917af0daa..22b4ef591a81 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -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 @@ static struct usb_device_id id_table [] = {
.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 @@ static struct usb_device_id id_table [] = {
{ 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 @@ static struct usb_device_id id_table_combined [] = {
{ 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 @@ static struct usb_device_id id_table_combined [] = {
{ 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 --git a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
index 86f8f3fb642a..089bcf98da86 100644
--- a/drivers/usb/serial/visor.h
+++ b/drivers/usb/serial/visor.h
@@ -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 --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index 9a88b60c9bd5..1f56f63bb8e5 100644
--- a/drivers/usb/storage/isd200.c
+++ b/drivers/usb/storage/isd200.c
@@ -650,7 +650,7 @@ static void isd200_log_config( struct isd200_info* info )
/**************************************************************************
* isd200_write_config
*
- * Write the ISD200 Configuraton data
+ * Write the ISD200 Configuration data
*
* RETURNS:
* ISD status code
@@ -693,7 +693,7 @@ int isd200_write_config( struct us_data *us )
/**************************************************************************
* isd200_read_config
*
- * Reads the ISD200 Configuraton data
+ * Reads the ISD200 Configuration data
*
* RETURNS:
* ISD status code
@@ -977,7 +977,7 @@ int isd200_get_inquiry_data( struct us_data *us )
/* 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 --git a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
index 799c4134751e..38c38ee90011 100644
--- a/drivers/usb/storage/transport.h
+++ b/drivers/usb/storage/transport.h
@@ -118,7 +118,7 @@ struct bulk_cs_wrap {
*/
#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 --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index b5c7e6745b1a..b89ca760a959 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -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");