diff options
author | Abhijit Naik <abhijitnaik27@gmail.com> | 2017-02-13 14:12:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-14 12:14:29 -0500 |
commit | 65ab7c241038f0486600288adc1b449b52ae3e16 (patch) | |
tree | 2a4730f20dba86d27fb803976c00ea1e83107c24 | |
parent | 4cf64a5f512da749ef635431fdf5da56bf1652af (diff) |
staging: bcm2835-audio: Fixed checkpatch warning due to line spacing
bcm2835-vchiq.c:
fixing ERROR: Checkpatch warnings due to extra blank lines or absence of blank
lines where needed.
Signed-off-by: Abhijit Naik <abhijitnaik27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c index d11f2cdd1014..af0cd0b36bc5 100644 --- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c | |||
@@ -78,7 +78,6 @@ static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream); | |||
78 | static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, | 78 | static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, |
79 | unsigned int count, void *src); | 79 | unsigned int count, void *src); |
80 | 80 | ||
81 | |||
82 | // Routine to send a message across a service | 81 | // Routine to send a message across a service |
83 | 82 | ||
84 | static int | 83 | static int |
@@ -109,6 +108,7 @@ static void my_wq_function(struct work_struct *work) | |||
109 | struct bcm2835_audio_work *w = | 108 | struct bcm2835_audio_work *w = |
110 | container_of(work, struct bcm2835_audio_work, my_work); | 109 | container_of(work, struct bcm2835_audio_work, my_work); |
111 | int ret = -9; | 110 | int ret = -9; |
111 | |||
112 | LOG_DBG(" .. IN %p:%d\n", w->alsa_stream, w->cmd); | 112 | LOG_DBG(" .. IN %p:%d\n", w->alsa_stream, w->cmd); |
113 | switch (w->cmd) { | 113 | switch (w->cmd) { |
114 | case BCM2835_AUDIO_START: | 114 | case BCM2835_AUDIO_START: |
@@ -132,6 +132,7 @@ static void my_wq_function(struct work_struct *work) | |||
132 | int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) | 132 | int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) |
133 | { | 133 | { |
134 | int ret = -1; | 134 | int ret = -1; |
135 | |||
135 | LOG_DBG(" .. IN\n"); | 136 | LOG_DBG(" .. IN\n"); |
136 | if (alsa_stream->my_wq) { | 137 | if (alsa_stream->my_wq) { |
137 | struct bcm2835_audio_work *work = | 138 | struct bcm2835_audio_work *work = |
@@ -153,6 +154,7 @@ int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) | |||
153 | int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream) | 154 | int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream) |
154 | { | 155 | { |
155 | int ret = -1; | 156 | int ret = -1; |
157 | |||
156 | LOG_DBG(" .. IN\n"); | 158 | LOG_DBG(" .. IN\n"); |
157 | if (alsa_stream->my_wq) { | 159 | if (alsa_stream->my_wq) { |
158 | struct bcm2835_audio_work *work = | 160 | struct bcm2835_audio_work *work = |
@@ -175,6 +177,7 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, | |||
175 | unsigned int count, void *src) | 177 | unsigned int count, void *src) |
176 | { | 178 | { |
177 | int ret = -1; | 179 | int ret = -1; |
180 | |||
178 | LOG_DBG(" .. IN\n"); | 181 | LOG_DBG(" .. IN\n"); |
179 | if (alsa_stream->my_wq) { | 182 | if (alsa_stream->my_wq) { |
180 | struct bcm2835_audio_work *work = | 183 | struct bcm2835_audio_work *work = |
@@ -219,6 +222,7 @@ static void audio_vchi_callback(void *param, | |||
219 | int status; | 222 | int status; |
220 | int msg_len; | 223 | int msg_len; |
221 | struct vc_audio_msg m; | 224 | struct vc_audio_msg m; |
225 | |||
222 | LOG_DBG(" .. IN instance=%p, handle=%p, alsa=%p, reason=%d, handle=%p\n", | 226 | LOG_DBG(" .. IN instance=%p, handle=%p, alsa=%p, reason=%d, handle=%p\n", |
223 | instance, instance ? instance->vchi_handle[0] : NULL, instance ? instance->alsa_stream : NULL, reason, msg_handle); | 227 | instance, instance ? instance->vchi_handle[0] : NULL, instance ? instance->alsa_stream : NULL, reason, msg_handle); |
224 | 228 | ||
@@ -244,6 +248,7 @@ static void audio_vchi_callback(void *param, | |||
244 | complete(&instance->msg_avail_comp); | 248 | complete(&instance->msg_avail_comp); |
245 | } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { | 249 | } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { |
246 | struct bcm2835_alsa_stream *alsa_stream = instance->alsa_stream; | 250 | struct bcm2835_alsa_stream *alsa_stream = instance->alsa_stream; |
251 | |||
247 | LOG_DBG(" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_COMPLETE, complete=%d\n", | 252 | LOG_DBG(" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_COMPLETE, complete=%d\n", |
248 | instance, m.u.complete.count); | 253 | instance, m.u.complete.count); |
249 | if (m.u.complete.cookie1 != BCM2835_AUDIO_WRITE_COOKIE1 || | 254 | if (m.u.complete.cookie1 != BCM2835_AUDIO_WRITE_COOKIE1 || |
@@ -357,6 +362,7 @@ static int vc_vchi_audio_deinit(struct bcm2835_audio_instance *instance) | |||
357 | /* Close all VCHI service connections */ | 362 | /* Close all VCHI service connections */ |
358 | for (i = 0; i < instance->num_connections; i++) { | 363 | for (i = 0; i < instance->num_connections; i++) { |
359 | int status; | 364 | int status; |
365 | |||
360 | LOG_DBG(" .. %i:closing %p\n", i, instance->vchi_handle[i]); | 366 | LOG_DBG(" .. %i:closing %p\n", i, instance->vchi_handle[i]); |
361 | vchi_service_use(instance->vchi_handle[i]); | 367 | vchi_service_use(instance->vchi_handle[i]); |
362 | 368 | ||
@@ -384,6 +390,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream | |||
384 | struct bcm2835_audio_instance *instance = | 390 | struct bcm2835_audio_instance *instance = |
385 | (struct bcm2835_audio_instance *)alsa_stream->instance; | 391 | (struct bcm2835_audio_instance *)alsa_stream->instance; |
386 | int ret; | 392 | int ret; |
393 | |||
387 | LOG_DBG(" .. IN\n"); | 394 | LOG_DBG(" .. IN\n"); |
388 | 395 | ||
389 | LOG_INFO("%s: start\n", __func__); | 396 | LOG_INFO("%s: start\n", __func__); |
@@ -445,6 +452,7 @@ int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream) | |||
445 | struct vc_audio_msg m; | 452 | struct vc_audio_msg m; |
446 | int status; | 453 | int status; |
447 | int ret; | 454 | int ret; |
455 | |||
448 | LOG_DBG(" .. IN\n"); | 456 | LOG_DBG(" .. IN\n"); |
449 | 457 | ||
450 | my_workqueue_init(alsa_stream); | 458 | my_workqueue_init(alsa_stream); |
@@ -494,6 +502,7 @@ static int bcm2835_audio_set_ctls_chan(struct bcm2835_alsa_stream *alsa_stream, | |||
494 | struct bcm2835_audio_instance *instance = alsa_stream->instance; | 502 | struct bcm2835_audio_instance *instance = alsa_stream->instance; |
495 | int status; | 503 | int status; |
496 | int ret; | 504 | int ret; |
505 | |||
497 | LOG_DBG(" .. IN\n"); | 506 | LOG_DBG(" .. IN\n"); |
498 | 507 | ||
499 | LOG_INFO(" Setting ALSA dest(%d), volume(%d)\n", | 508 | LOG_INFO(" Setting ALSA dest(%d), volume(%d)\n", |
@@ -551,6 +560,7 @@ int bcm2835_audio_set_ctls(struct bcm2835_chip *chip) | |||
551 | { | 560 | { |
552 | int i; | 561 | int i; |
553 | int ret = 0; | 562 | int ret = 0; |
563 | |||
554 | LOG_DBG(" .. IN\n"); | 564 | LOG_DBG(" .. IN\n"); |
555 | LOG_DBG(" Setting ALSA dest(%d), volume(%d)\n", chip->dest, chip->volume); | 565 | LOG_DBG(" Setting ALSA dest(%d), volume(%d)\n", chip->dest, chip->volume); |
556 | 566 | ||
@@ -580,6 +590,7 @@ int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream, | |||
580 | struct bcm2835_audio_instance *instance = alsa_stream->instance; | 590 | struct bcm2835_audio_instance *instance = alsa_stream->instance; |
581 | int status; | 591 | int status; |
582 | int ret; | 592 | int ret; |
593 | |||
583 | LOG_DBG(" .. IN\n"); | 594 | LOG_DBG(" .. IN\n"); |
584 | 595 | ||
585 | LOG_INFO(" Setting ALSA channels(%d), samplerate(%d), bits-per-sample(%d)\n", | 596 | LOG_INFO(" Setting ALSA channels(%d), samplerate(%d), bits-per-sample(%d)\n", |
@@ -655,6 +666,7 @@ static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream) | |||
655 | struct bcm2835_audio_instance *instance = alsa_stream->instance; | 666 | struct bcm2835_audio_instance *instance = alsa_stream->instance; |
656 | int status; | 667 | int status; |
657 | int ret; | 668 | int ret; |
669 | |||
658 | LOG_DBG(" .. IN\n"); | 670 | LOG_DBG(" .. IN\n"); |
659 | 671 | ||
660 | if (mutex_lock_interruptible(&instance->vchi_mutex)) { | 672 | if (mutex_lock_interruptible(&instance->vchi_mutex)) { |
@@ -693,6 +705,7 @@ static int bcm2835_audio_stop_worker(struct bcm2835_alsa_stream *alsa_stream) | |||
693 | struct bcm2835_audio_instance *instance = alsa_stream->instance; | 705 | struct bcm2835_audio_instance *instance = alsa_stream->instance; |
694 | int status; | 706 | int status; |
695 | int ret; | 707 | int ret; |
708 | |||
696 | LOG_DBG(" .. IN\n"); | 709 | LOG_DBG(" .. IN\n"); |
697 | 710 | ||
698 | if (mutex_lock_interruptible(&instance->vchi_mutex)) { | 711 | if (mutex_lock_interruptible(&instance->vchi_mutex)) { |
@@ -732,6 +745,7 @@ int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream) | |||
732 | struct bcm2835_audio_instance *instance = alsa_stream->instance; | 745 | struct bcm2835_audio_instance *instance = alsa_stream->instance; |
733 | int status; | 746 | int status; |
734 | int ret; | 747 | int ret; |
748 | |||
735 | LOG_DBG(" .. IN\n"); | 749 | LOG_DBG(" .. IN\n"); |
736 | 750 | ||
737 | my_workqueue_quit(alsa_stream); | 751 | my_workqueue_quit(alsa_stream); |
@@ -839,6 +853,7 @@ static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, | |||
839 | } else { | 853 | } else { |
840 | while (count > 0) { | 854 | while (count > 0) { |
841 | int bytes = min((int) m.u.write.max_packet, (int) count); | 855 | int bytes = min((int) m.u.write.max_packet, (int) count); |
856 | |||
842 | status = bcm2835_vchi_msg_queue(instance->vchi_handle[0], | 857 | status = bcm2835_vchi_msg_queue(instance->vchi_handle[0], |
843 | src, bytes); | 858 | src, bytes); |
844 | src = (char *)src + bytes; | 859 | src = (char *)src + bytes; |
@@ -885,6 +900,7 @@ void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_strea | |||
885 | unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream) | 900 | unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream) |
886 | { | 901 | { |
887 | unsigned int count = atomic_read(&alsa_stream->retrieved); | 902 | unsigned int count = atomic_read(&alsa_stream->retrieved); |
903 | |||
888 | atomic_sub(count, &alsa_stream->retrieved); | 904 | atomic_sub(count, &alsa_stream->retrieved); |
889 | return count; | 905 | return count; |
890 | } | 906 | } |