media: remove third argument of usb_maxpacket()
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Thu, 17 Mar 2022 03:55:09 +0000 (12:55 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Apr 2022 08:33:53 +0000 (10:33 +0200)
The third argument of usb_maxpacket(): in_out has been deprecated
because it could be derived from the second argument (e.g. using
usb_pipeout(pipe)).

N.B. function usb_maxpacket() was made variadic to accommodate the
transition from the old prototype with three arguments to the new one
with only two arguments (so that no renaming is needed). The variadic
argument is to be removed once all users of usb_maxpacket() get
migrated.

CC: Sean Young <sean@mess.org>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Benjamin Valentin <benpicco@googlemail.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20220317035514.6378-5-mailhol.vincent@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/rc/ati_remote.c
drivers/media/rc/mceusb.c
drivers/media/rc/streamzap.c
drivers/media/rc/xbox_remote.c
drivers/media/usb/tm6000/tm6000-dvb.c
drivers/media/usb/tm6000/tm6000-input.c
drivers/media/usb/tm6000/tm6000-video.c

index c12dda7..3155e87 100644 (file)
@@ -773,7 +773,7 @@ static int ati_remote_initialize(struct ati_remote *ati_remote)
 
        /* Set up irq_urb */
        pipe = usb_rcvintpipe(udev, ati_remote->endpoint_in->bEndpointAddress);
-       maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+       maxp = usb_maxpacket(udev, pipe);
        maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
        usb_fill_int_urb(ati_remote->irq_urb, udev, pipe, ati_remote->inbuf,
@@ -784,7 +784,7 @@ static int ati_remote_initialize(struct ati_remote *ati_remote)
 
        /* Set up out_urb */
        pipe = usb_sndintpipe(udev, ati_remote->endpoint_out->bEndpointAddress);
-       maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+       maxp = usb_maxpacket(udev, pipe);
        maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
        usb_fill_int_urb(ati_remote->out_urb, udev, pipe, ati_remote->outbuf,
index 2dc810f..0834d5f 100644 (file)
@@ -1728,7 +1728,7 @@ static int mceusb_dev_probe(struct usb_interface *intf,
                pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress);
        else
                pipe = usb_rcvbulkpipe(dev, ep_in->bEndpointAddress);
-       maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+       maxp = usb_maxpacket(dev, pipe);
 
        ir = kzalloc(sizeof(struct mceusb_dev), GFP_KERNEL);
        if (!ir)
index 16ba85d..deb8533 100644 (file)
@@ -307,7 +307,7 @@ static int streamzap_probe(struct usb_interface *intf,
        }
 
        pipe = usb_rcvintpipe(usbdev, endpoint->bEndpointAddress);
-       maxp = usb_maxpacket(usbdev, pipe, usb_pipeout(pipe));
+       maxp = usb_maxpacket(usbdev, pipe);
 
        if (maxp == 0) {
                dev_err(&intf->dev, "%s: endpoint Max Packet Size is 0!?!\n",
index 98d0b43..7424b20 100644 (file)
@@ -171,7 +171,7 @@ static int xbox_remote_initialize(struct xbox_remote *xbox_remote,
 
        /* Set up irq_urb */
        pipe = usb_rcvintpipe(udev, endpoint_in->bEndpointAddress);
-       maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+       maxp = usb_maxpacket(udev, pipe);
        maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
        usb_fill_int_urb(xbox_remote->irq_urb, udev, pipe, xbox_remote->inbuf,
index 8c2725e..ee04973 100644 (file)
@@ -120,7 +120,7 @@ static int tm6000_start_stream(struct tm6000_core *dev)
        pipe = usb_rcvbulkpipe(dev->udev, dev->bulk_in.endp->desc.bEndpointAddress
                                                          & USB_ENDPOINT_NUMBER_MASK);
 
-       size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+       size = usb_maxpacket(dev->udev, pipe);
        size = size * 15; /* 512 x 8 or 12 or 15 */
 
        dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL);
index 84602ed..5136e9e 100644 (file)
@@ -340,7 +340,7 @@ static int __tm6000_ir_int_start(struct rc_dev *rc)
                dev->int_in.endp->desc.bEndpointAddress
                & USB_ENDPOINT_NUMBER_MASK);
 
-       size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+       size = usb_maxpacket(dev->udev, pipe);
        dprintk(1, "IR max size: %d\n", size);
 
        ir->int_urb->transfer_buffer = kzalloc(size, GFP_ATOMIC);
index e293f6f..d855a19 100644 (file)
@@ -570,7 +570,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)
                               dev->isoc_in.endp->desc.bEndpointAddress &
                               USB_ENDPOINT_NUMBER_MASK);
 
-       size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+       size = usb_maxpacket(dev->udev, pipe);
 
        if (size > dev->isoc_in.maxsize)
                size = dev->isoc_in.maxsize;