summaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/usb_stream.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-05-17 16:15:37 +0300
committerTakashi Iwai <tiwai@suse.de>2021-05-17 17:03:58 +0300
commita829dd5b3840fd9a24608ed73eb21ba239ae5334 (patch)
treedb6c4cb69f1e5163059eb236594cf13d35353f26 /sound/usb/usx2y/usb_stream.h
parent4c0a58ef36f3de1be0d1c8565ca854bcabd37e2b (diff)
downloadlinux-a829dd5b3840fd9a24608ed73eb21ba239ae5334.tar.xz
ALSA: usx2y: Coding style fixes
This patch fixes various trivial coding-style issues in usx2y code, such as: * the assginments in if condition * comparison order with constants * NULL / zero checks * unsigned -> unsigned int * addition of braces in control blocks * debug print with function names * move local variables in block into function head * reduction of too nested indentations No functional changes. Link: https://lore.kernel.org/r/20210517131545.27252-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y/usb_stream.h')
-rw-r--r--sound/usb/usx2y/usb_stream.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/sound/usb/usx2y/usb_stream.h b/sound/usb/usx2y/usb_stream.h
index 851358a8d709..73e57b341adc 100644
--- a/sound/usb/usx2y/usb_stream.h
+++ b/sound/usb/usx2y/usb_stream.h
@@ -12,7 +12,7 @@ struct usb_stream_kernel {
void *write_page;
- unsigned n_o_ps;
+ unsigned int n_o_ps;
struct urb *inurb[USB_STREAM_NURBS];
struct urb *idle_inurb;
@@ -26,18 +26,21 @@ struct usb_stream_kernel {
wait_queue_head_t sleep;
- unsigned out_phase;
- unsigned out_phase_peeked;
- unsigned freqn;
+ unsigned int out_phase;
+ unsigned int out_phase_peeked;
+ unsigned int freqn;
};
struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk,
struct usb_device *dev,
- unsigned in_endpoint, unsigned out_endpoint,
- unsigned sample_rate, unsigned use_packsize,
- unsigned period_frames, unsigned frame_size);
-void usb_stream_free(struct usb_stream_kernel *);
-int usb_stream_start(struct usb_stream_kernel *);
-void usb_stream_stop(struct usb_stream_kernel *);
+ unsigned int in_endpoint,
+ unsigned int out_endpoint,
+ unsigned int sample_rate,
+ unsigned int use_packsize,
+ unsigned int period_frames,
+ unsigned int frame_size);
+void usb_stream_free(struct usb_stream_kernel *sk);
+int usb_stream_start(struct usb_stream_kernel *sk);
+void usb_stream_stop(struct usb_stream_kernel *sk);
#endif /* __USB_STREAM_H */