diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2020-05-27 11:06:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-27 12:24:45 +0200 |
commit | 1c538a417977ec102d47297e8c0f4619100f42c2 (patch) | |
tree | d836d4ca390fe56b763484d78a7de55d6207522a /drivers/staging/most | |
parent | 3466a8c15be8a0acea399f78fbe3764e14d7c11a (diff) |
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 <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/usb/usb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 56b75e42aafe..0e1264dc1231 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; |