staging: bcm2835-audio: Code refactoring of vchiq accessor codes
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Sep 2018 15:58:48 +0000 (17:58 +0200)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:30 +0000 (00:08 +0100)
commit8901c568c574328414de4c8a852d35707e50b044
treef7fc6aa1016c7b4b6d01a45b2869784998a05740
parent97756b9ba014bb8aad14f6dc33a26b32763fb39d
staging: bcm2835-audio: Code refactoring of vchiq accessor codes

commit 769a8e9bf5cf39813f52962fdafdf7e4d52ad585 upstream.

This is a cleanup and code refactoring in bcm2835-vchiq.c.

The major code changes are to provide local helpers for easier use of
lock / unlock, and message passing with/without response wait.  This
allows us to reduce lots of open codes.

Also, the max packet is set at opening the stream, not at each time
when the write gets called.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c