USB: serial: keyspan_pda: drop redundant usb-serial pointer
authorJohan Hovold <johan@kernel.org>
Sun, 25 Oct 2020 17:46:00 +0000 (18:46 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Nov 2020 10:02:06 +0000 (11:02 +0100)
Drop the redundant struct usb_serial pointer from the driver port data.

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/keyspan_pda.c

index f582e0a3ae560b068dabd7cdb2e80786674e4081..e6f933e8d25ffa5d1b7f05f529d66435d3da2d2f 100644 (file)
@@ -76,7 +76,7 @@ static const struct usb_device_id id_table_fake[] = {
 static int keyspan_pda_get_write_room(struct keyspan_pda_private *priv)
 {
        struct usb_serial_port *port = priv->port;
-       struct usb_serial *serial = priv->serial;
+       struct usb_serial *serial = port->serial;
        u8 *room;
        int rc;
 
@@ -114,7 +114,7 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
        struct keyspan_pda_private *priv =
                container_of(work, struct keyspan_pda_private, unthrottle_work);
        struct usb_serial_port *port = priv->port;
-       struct usb_serial *serial = priv->serial;
+       struct usb_serial *serial = port->serial;
        unsigned long flags;
        int result;
 
@@ -665,7 +665,6 @@ static int keyspan_pda_port_probe(struct usb_serial_port *port)
                return -ENOMEM;
 
        INIT_WORK(&priv->unthrottle_work, keyspan_pda_request_unthrottle);
-       priv->serial = port->serial;
        priv->port = port;
 
        usb_set_serial_port_data(port, priv);