summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2019-11-07 14:29:01 +0100
committerJohan Hovold <johan@kernel.org>2019-11-12 09:57:16 +0100
commit2d52f0763f8ea965d35dc13958b85d0e88e596b2 (patch)
treec0bedc7cd38218a72c0c52163cd18a936020ee89
parent6d3471eded5e64c0310ceeff4adf9ca6d324ddd7 (diff)
USB: serial: mos7840: drop serial struct accessor
Drop the helper used to retrieve the serial struct pointer from the port structure. Note that this helper was only used when the serial structure was actually not needed. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r--drivers/usb/serial/mos7840.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 207b88d948a9..01787685a4ee 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -446,19 +446,6 @@ static void mos7840_led_activity(struct usb_serial_port *port)
jiffies + msecs_to_jiffies(LED_ON_MS));
}
-static struct usb_serial *mos7840_get_usb_serial(struct usb_serial_port *port,
- const char *function)
-{
- /* if no port was specified */
- if (!port) {
- /* then say that we don't have a valid usb_serial thing,
- * which will end up genrating -ENODEV return values */
- return NULL;
- }
-
- return port->serial;
-}
-
/*****************************************************************************
* mos7840_bulk_in_callback
* this is the callback function for when we have received data on the
@@ -471,7 +458,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
struct usb_serial_port *port = mos7840_port->port;
int retval;
unsigned char *data;
- struct usb_serial *serial;
int status = urb->status;
if (status) {
@@ -480,12 +466,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
return;
}
- serial = mos7840_get_usb_serial(port, __func__);
- if (!serial) {
- mos7840_port->read_urb_busy = false;
- return;
- }
-
data = urb->transfer_buffer;
usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
@@ -822,15 +802,10 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty)
static void mos7840_close(struct usb_serial_port *port)
{
- struct usb_serial *serial;
struct moschip_port *mos7840_port;
int j;
__u16 Data;
- serial = mos7840_get_usb_serial(port, __func__);
- if (!serial)
- return;
-
mos7840_port = mos7840_get_port_private(port);
if (mos7840_port == NULL)
return;
@@ -866,13 +841,8 @@ static void mos7840_break(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
unsigned char data;
- struct usb_serial *serial;
struct moschip_port *mos7840_port;
- serial = mos7840_get_usb_serial(port, __func__);
- if (!serial)
- return;
-
mos7840_port = mos7840_get_port_private(port);
if (mos7840_port == NULL)