OSDN Git Service

staging: bcm2835-audio: Simplify callback structure for write data
authorMichael Zoran <mzoran@crowfest.net>
Sun, 29 Jan 2017 05:39:45 +0000 (21:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2017 09:47:00 +0000 (10:47 +0100)
commit0cec463e391e05b807a5114e9f0635e4980b805e
tree849108b90589f627f3c6e40f166baad3c16f287f
parent9c4f728693f7384144bb13dcd65dd8f6997e29e8
staging: bcm2835-audio: Simplify callback structure for write data

The device sends data to the audio devices by sending a message with
the data through VC04_SERVICES/VCHIQ.  This message contains a
callback pointer that is always filled in with the same function.
This is prone to corruption issues.

Instead fill the callback fields with a fixed cookie value to perforam
some validation on the message response and call the handler function
directly instead of through the callback pointer.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm2835-audio/bcm2835-pcm.c
drivers/staging/bcm2835-audio/bcm2835-vchiq.c
drivers/staging/bcm2835-audio/bcm2835.h
drivers/staging/bcm2835-audio/vc_vchi_audioserv_defs.h