On Mon, 4 Jan 2021 15:53:02 +0100
Johan Hovold [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ b/drivers/usb/class/usblp.c
-#define usblp_hp_channel_change_request(usblp, channel, buffer) \
- usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE, channel, buffer, 1)
+static int usblp_hp_channel_change_request(struct usblp *usblp, int channel, u8 *new_channel)
Acked-By: Pete Zaitcev <zaitcev@redhat.com>
I would probably get rid of the buffer pointer and return
new_channel & 0xFF in case of success. That would kill
the newChannel too, and there's no need to debage u8 versus
unsigned char. But this is good enough. A function is better
than trying to cram the kfree() into the clause of the switch.
-- Pete