tree bc902a61ffd2c09ddbf3d7c20a67b0831d612862
parent 7bb75aeeeec7417a961920b3f63a83007475260f
author Tobias Klauser <[EMAIL PROTECTED]> Mon, 04 Jul 2005 19:32:51 +0200
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 09 Sep 2005 06:22:16 -0700

[PATCH] USB: drivers/serial/usb-serial: Remove unneeded void * casts

The following patch removes unneeded casts for the following (void *) pointers:
        - tty_struct->driver_data
        - void *private argument of usb_serial_port_softint()

Signed-off-by: Tobias Klauser <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 drivers/usb/serial/usb-serial.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -531,7 +531,7 @@ bailout_kref_put:
 
 static void serial_close(struct tty_struct *tty, struct file * filp)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        if (!port)
                return;
@@ -561,7 +561,7 @@ static void serial_close(struct tty_stru
 
 static int serial_write (struct tty_struct * tty, const unsigned char *buf, 
int count)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        int retval = -EINVAL;
 
        dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
@@ -580,7 +580,7 @@ exit:
 
 static int serial_write_room (struct tty_struct *tty) 
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        int retval = -EINVAL;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
@@ -599,7 +599,7 @@ exit:
 
 static int serial_chars_in_buffer (struct tty_struct *tty) 
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        int retval = -EINVAL;
 
        dbg("%s = port %d", __FUNCTION__, port->number);
@@ -618,7 +618,7 @@ exit:
 
 static void serial_throttle (struct tty_struct * tty)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -634,7 +634,7 @@ static void serial_throttle (struct tty_
 
 static void serial_unthrottle (struct tty_struct * tty)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -650,7 +650,7 @@ static void serial_unthrottle (struct tt
 
 static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned 
int cmd, unsigned long arg)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        int retval = -ENODEV;
 
        dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
@@ -672,7 +672,7 @@ exit:
 
 static void serial_set_termios (struct tty_struct *tty, struct termios * old)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -688,7 +688,7 @@ static void serial_set_termios (struct t
 
 static void serial_break (struct tty_struct *tty, int break_state)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -749,7 +749,7 @@ done:
 
 static int serial_tiocmget (struct tty_struct *tty, struct file *file)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -768,7 +768,7 @@ exit:
 static int serial_tiocmset (struct tty_struct *tty, struct file *file,
                            unsigned int set, unsigned int clear)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -786,7 +786,7 @@ exit:
 
 void usb_serial_port_softint(void *private)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *)private;
+       struct usb_serial_port *port = private;
        struct tty_struct *tty;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to