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 <tklauser@nuerscht.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static void serial_close(struct tty_struct *tty, struct file * filp)
{
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;
static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count)
{
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);
int retval = -EINVAL;
dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
static int serial_write_room (struct tty_struct *tty)
{
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);
int retval = -EINVAL;
dbg("%s - port %d", __FUNCTION__, port->number);
static int serial_chars_in_buffer (struct tty_struct *tty)
{
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);
int retval = -EINVAL;
dbg("%s = port %d", __FUNCTION__, port->number);
static void serial_throttle (struct tty_struct * tty)
{
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);
dbg("%s - port %d", __FUNCTION__, port->number);
static void serial_unthrottle (struct tty_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);
dbg("%s - port %d", __FUNCTION__, port->number);
static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
{
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);
int retval = -ENODEV;
dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
static void serial_set_termios (struct tty_struct *tty, struct termios * old)
{
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);
dbg("%s - port %d", __FUNCTION__, port->number);
static void serial_break (struct tty_struct *tty, int break_state)
{
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);
dbg("%s - port %d", __FUNCTION__, port->number);
static int serial_tiocmget (struct tty_struct *tty, struct file *file)
{
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);
dbg("%s - port %d", __FUNCTION__, port->number);
static int serial_tiocmset (struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
{
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);
dbg("%s - port %d", __FUNCTION__, port->number);
void usb_serial_port_softint(void *private)
{
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);
struct tty_struct *tty;
dbg("%s - port %d", __FUNCTION__, port->number);