aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y/usb_stream.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-05-17 15:15:37 +0200
committerTakashi Iwai <tiwai@suse.de>2021-05-17 16:03:58 +0200
commita829dd5b3840fd9a24608ed73eb21ba239ae5334 (patch)
treedb6c4cb69f1e5163059eb236594cf13d35353f26 /sound/usb/usx2y/usb_stream.h
parentALSA: usx2y: Fix spaces (diff)
downloadlinux-dev-a829dd5b3840fd9a24608ed73eb21ba239ae5334.tar.xz
linux-dev-a829dd5b3840fd9a24608ed73eb21ba239ae5334.zip
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 */