summaryrefslogtreecommitdiffstats
path: root/alsa.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-09-05 16:38:25 +1000
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:32 +1100
commit93db730a4d435e835d144e3393088968e1645c87 (patch)
tree79ced019a01a3602a0d5425477e42348d2b2cd5c /alsa.h
parent91c57bc05904d2f87af864ad9d5f686428ce827f (diff)
Fix warnings generated by checkpatch.pl
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa.h')
-rwxr-xr-xalsa.h41
1 files changed, 22 insertions, 19 deletions
diff --git a/alsa.h b/alsa.h
index 815dd65..12148b9 100755
--- a/alsa.h
+++ b/alsa.h
@@ -18,34 +18,37 @@
#define PRINT_ERR(errno, errmsg, ...) \
pr_err("[%s()] %s [ERRNO:%d]", __func__, errmsg, ##__VA_ARGS__, errno);
-#define CHK_ERR(errno) \
- do { \
- if (errno < 0) \
- return errno; \
+#define CHK_ERR(errno) \
+ do { \
+ if ((errno) < 0) \
+ return (errno); \
} while (0)
-#define CHK_ERR_V(errno, errmsg, ...) \
- do { \
- if (errno < 0) { \
- PRINT_ERR(errno, errmsg, ##__VA_ARGS__) \
- return errno; \
- } \
+#define CHK_ERR_V(errno, errmsg, ...) \
+ do { \
+ if ((errno) < 0) { \
+ PRINT_ERR((errno), (errmsg), ##__VA_ARGS__) \
+ return (errno); \
+ } \
} while (0)
#define CHK_NULL(x) \
do { \
- if (!x) \
+ if (!(x)) \
return -EFAULT; \
} while (0)
-#define CHK_NULL_V(x, errmsg, ...) \
- do { \
- if (!x) { \
- PRINT_ERR(EFAULT, errmsg, ##__VA_ARGS__) \
- return -EFAULT; \
- } \
+#define CHK_NULL_V(x, errmsg, ...) \
+ do { \
+ if (!(x)) { \
+ PRINT_ERR(EFAULT, (errmsg), ##__VA_ARGS__) \
+ return -EFAULT; \
+ } \
} while (0)
+extern struct avirt_coreinfo coreinfo;
+extern struct snd_pcm_ops pcm_ops;
+
/**
* avirt_alsa_configure_pcm- Configure the PCM device
* @config: Device configuration structure array
@@ -54,7 +57,7 @@
* @return: 0 on success or error code otherwise
*/
int avirt_alsa_configure_pcm(struct avirt_alsa_devconfig *config, int direction,
- unsigned numdevices);
+ unsigned int numdevices);
/**
* avirt_alsa_register - Registers the ALSA driver
@@ -82,7 +85,7 @@ struct avirt_alsa_group *avirt_alsa_get_group(int direction);
* pcm_buff_complete_cb - PCM buffer complete callback
* @substream: pointer to ALSA PCM substream
* @return 0 on success or error code otherwise
- *
+ *
* This should be called from a child Audio Path once it has finished processing
* the PCM buffer
*/