can: kvaser_usb: Add pointer to struct usb_interface into struct kvaser_usb
authorJimmy Assarsson <extja@kvaser.com>
Wed, 18 Jul 2018 21:29:22 +0000 (23:29 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 27 Jul 2018 08:40:18 +0000 (10:40 +0200)
Add pointer to struct usb_interface into struct kvaser_usb.

Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c

index 9c33f72..9e0e2c8 100644 (file)
@@ -414,6 +414,7 @@ struct kvaser_usb_tx_urb_context {
 
 struct kvaser_usb {
        struct usb_device *udev;
+       struct usb_interface *intf;
        struct kvaser_usb_net_priv *nets[MAX_NET_DEVICES];
 
        struct usb_endpoint_descriptor *bulk_in, *bulk_out;
@@ -1962,6 +1963,8 @@ static int kvaser_usb_probe(struct usb_interface *intf,
                return -ENODEV;
        }
 
+       dev->intf = intf;
+
        err = kvaser_usb_get_endpoints(intf, &dev->bulk_in, &dev->bulk_out);
        if (err) {
                dev_err(&intf->dev, "Cannot get usb endpoint(s)");