git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
usb
/
serial
/
cyberjack.c
diff --git
a/drivers/usb/serial/cyberjack.c
b/drivers/usb/serial/cyberjack.c
index
33613b0
..
3a367f5
100644
(file)
--- a/
drivers/usb/serial/cyberjack.c
+++ b/
drivers/usb/serial/cyberjack.c
@@
-57,8
+57,7
@@
static int cyberjack_startup (struct usb_serial *serial);
static void cyberjack_shutdown (struct usb_serial *serial);
static int cyberjack_open (struct usb_serial_port *port, struct file *filp);
static void cyberjack_close (struct usb_serial_port *port, struct file *filp);
static void cyberjack_shutdown (struct usb_serial *serial);
static int cyberjack_open (struct usb_serial_port *port, struct file *filp);
static void cyberjack_close (struct usb_serial_port *port, struct file *filp);
-static int cyberjack_write (struct usb_serial_port *port, int from_user,
- const unsigned char *buf, int count);
+static int cyberjack_write (struct usb_serial_port *port, const unsigned char *buf, int count);
static int cyberjack_write_room( struct usb_serial_port *port );
static void cyberjack_read_int_callback (struct urb *urb, struct pt_regs *regs);
static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
static int cyberjack_write_room( struct usb_serial_port *port );
static void cyberjack_read_int_callback (struct urb *urb, struct pt_regs *regs);
static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
@@
-149,7
+148,7
@@
static void cyberjack_shutdown (struct usb_serial *serial)
dbg("%s", __FUNCTION__);
for (i=0; i < serial->num_ports; ++i) {
dbg("%s", __FUNCTION__);
for (i=0; i < serial->num_ports; ++i) {
- usb_
unlink_urb
(serial->port[i]->interrupt_in_urb);
+ usb_
kill_urb
(serial->port[i]->interrupt_in_urb);
/* My special items, the standard routines free my urbs */
kfree(usb_get_serial_port_data(serial->port[i]));
usb_set_serial_port_data(serial->port[i], NULL);
/* My special items, the standard routines free my urbs */
kfree(usb_get_serial_port_data(serial->port[i]));
usb_set_serial_port_data(serial->port[i], NULL);
@@
-189,12
+188,12
@@
static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
if (port->serial->dev) {
/* shutdown any bulk reads that might be going on */
if (port->serial->dev) {
/* shutdown any bulk reads that might be going on */
- usb_
unlink_urb
(port->write_urb);
- usb_
unlink_urb
(port->read_urb);
+ usb_
kill_urb
(port->write_urb);
+ usb_
kill_urb
(port->read_urb);
}
}
}
}
-static int cyberjack_write (struct usb_serial_port *port,
int from_user,
const unsigned char *buf, int count)
+static int cyberjack_write (struct usb_serial_port *port, const unsigned char *buf, int count)
{
struct usb_serial *serial = port->serial;
struct cyberjack_private *priv = usb_get_serial_port_data(port);
{
struct usb_serial *serial = port->serial;
struct cyberjack_private *priv = usb_get_serial_port_data(port);
@@
-203,7
+202,6
@@
static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
int wrexpected;
dbg("%s - port %d", __FUNCTION__, port->number);
int wrexpected;
dbg("%s - port %d", __FUNCTION__, port->number);
- dbg("%s - from_user %d", __FUNCTION__, from_user);
if (count == 0) {
dbg("%s - write request of 0 bytes", __FUNCTION__);
if (count == 0) {
dbg("%s - write request of 0 bytes", __FUNCTION__);
@@
-225,14
+223,7
@@
static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
}
/* Copy data */
}
/* Copy data */
- if (from_user) {
- if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
- spin_unlock_irqrestore(&priv->lock, flags);
- return -EFAULT;
- }
- } else {
- memcpy (priv->wrbuf+priv->wrfilled, buf, count);
- }
+ memcpy (priv->wrbuf+priv->wrfilled, buf, count);
usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count,
priv->wrbuf+priv->wrfilled);
usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count,
priv->wrbuf+priv->wrfilled);
@@
-511,6
+502,7
@@
module_exit(cyberjack_exit);
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_VERSION( DRIVER_VERSION );
MODULE_LICENSE("GPL");
module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_LICENSE("GPL");
module_param(debug, bool, S_IRUGO | S_IWUSR);