From: Christian Gromm Date: Wed, 27 May 2020 09:06:18 +0000 (+0200) Subject: staging: most: usb: change order of function parameters X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1c538a417977ec102d47297e8c0f4619100f42c2;p=linux.git staging: most: usb: change order of function parameters This patch swaps the arguments of function get_stream_frame_size to have the struct device as first parameter. Signed-off-by: Christian Gromm Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/1590570387-27069-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 56b75e42aafe5..0e1264dc1231e 100644 --- a/drivers/staging/most/usb/usb.c +++ b/drivers/staging/most/usb/usb.c @@ -183,10 +183,11 @@ static inline int start_sync_ep(struct usb_device *usb_dev, u16 ep) /** * get_stream_frame_size - calculate frame size of current configuration + * @dev: device structure * @cfg: channel configuration */ -static unsigned int get_stream_frame_size(struct most_channel_config *cfg, - struct device *dev) +static unsigned int get_stream_frame_size(struct device *dev, + struct most_channel_config *cfg) { unsigned int frame_size = 0; unsigned int sub_size = cfg->subbuffer_size; @@ -270,7 +271,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel) static int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) { struct most_channel_config *conf = &mdev->conf[channel]; - unsigned int frame_size = get_stream_frame_size(conf, &mdev->dev); + unsigned int frame_size = get_stream_frame_size(&mdev->dev, conf); unsigned int j, num_frames; if (!frame_size) @@ -304,7 +305,7 @@ static int hdm_remove_padding(struct most_dev *mdev, int channel, struct mbo *mbo) { struct most_channel_config *const conf = &mdev->conf[channel]; - unsigned int frame_size = get_stream_frame_size(conf, &mdev->dev); + unsigned int frame_size = get_stream_frame_size(&mdev->dev, conf); unsigned int j, num_frames; if (!frame_size) @@ -600,7 +601,7 @@ static int hdm_configure_channel(struct most_interface *iface, int channel, mdev->padding_active[channel] = true; - frame_size = get_stream_frame_size(conf, &mdev->dev); + frame_size = get_stream_frame_size(&mdev->dev, conf); if (frame_size == 0 || frame_size > USB_MTU) { dev_warn(dev, "Misconfig: frame size wrong\n"); return -EINVAL;