staging: vc04_services: bcm2835-audio: Fixed warnings
Subsystems (3)
PATCH 1/1 staging: vc04_services: bcm2835-audio: Fixed warnings
Fixed warnings provided by checkpatch.pl
Signed-off-by Arnold Chand <[email protected]>
--- .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 18 +++--- .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 25 ++++---- .../bcm2835-audio/bcm2835-vchiq.c | 59 ++++++++++--------- .../vc04_services/bcm2835-audio/bcm2835.h | 4 +- 4 files changed, 56 insertions(+), 50 deletions(-)
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c +10 -8
@@ -68,7 +68,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol, }static int snd_bcm2835_ctl_put (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_value *ucontrol) +struct snd_ctl_elem_value *ucontrol) {struct bcm2835_chip *chip =snd_kcontrol_chip (kcontrol);int val, *valp;
@@ -101,7 +101,8 @@ static const struct snd_kcontrol_new snd_bcm2835_ctl[] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "PCM Playback Volume", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ, .private_value = PCM_PLAYBACK_VOLUME, .info = snd_bcm2835_ctl_info, .get = snd_bcm2835_ctl_get,
@@ -129,7 +130,7 @@ static const struct snd_kcontrol_new snd_bcm2835_ctl[] = { };static int snd_bcm2835_spdif_default_info (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_info *uinfo) +struct snd_ctl_elem_info *uinfo) { uinfo->type =SNDRV_CTL_ELEM_TYPE_IEC958 ; uinfo->count =1 ;
@@ -137,7 +138,7 @@ static int snd_bcm2835_spdif_default_info(struct snd_kcontrol *kcontrol, }static int snd_bcm2835_spdif_default_get (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_value *ucontrol) +struct snd_ctl_elem_value *ucontrol) {struct bcm2835_chip *chip =snd_kcontrol_chip (kcontrol);int i;
@@ -153,7 +154,7 @@ static int snd_bcm2835_spdif_default_get(struct snd_kcontrol *kcontrol, }static int snd_bcm2835_spdif_default_put (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_value *ucontrol) +struct snd_ctl_elem_value *ucontrol) {struct bcm2835_chip *chip =snd_kcontrol_chip (kcontrol);unsigned int val =0 ;
@@ -162,7 +163,8 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,mutex_lock (&chip->audio_mutex);for (i =0 ; i <4 ; i++) - val |= (unsigned int )ucontrol->value.iec958.status[i] << (i *8 ); + val |= (unsigned int )ucontrol->value.iec958.status[i] << + (i *8 ); change = val != chip->spdif_status; chip->spdif_status = val;
@@ -172,7 +174,7 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol, }static int snd_bcm2835_spdif_mask_info (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_info *uinfo) +struct snd_ctl_elem_info *uinfo) { uinfo->type =SNDRV_CTL_ELEM_TYPE_IEC958 ; uinfo->count =1 ;
@@ -180,7 +182,7 @@ static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol, }static int snd_bcm2835_spdif_mask_get (struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_value *ucontrol) +struct snd_ctl_elem_value *ucontrol) {/* * bcm2835 supports only consumer mode and sets all other format flags
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +14 -11
@@ -81,17 +81,17 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream, }/* open callback */ -static int snd_bcm2835_playback_open_generic ( -struct snd_pcm_substream *substream,int spdif) +static int snd_bcm2835_playback_open_generic (struct snd_pcm_substream *substrm, +int spdif) { -struct bcm2835_chip *chip =snd_pcm_substream_chip (substream); -struct snd_pcm_runtime *runtime = substream->runtime; +struct bcm2835_chip *chip =snd_pcm_substream_chip (substrm); +struct snd_pcm_runtime *runtime = substrm->runtime;struct bcm2835_alsa_stream *alsa_stream;int idx;int err;mutex_lock (&chip->audio_mutex); - idx = substream->number; + idx = substrm->number;if (spdif && chip->opened) { err = -EBUSY ;
@@ -116,7 +116,7 @@ static int snd_bcm2835_playback_open_generic(/* Initialise alsa_stream */ alsa_stream->chip = chip; - alsa_stream->substream = substream; + alsa_stream->substream = substrm; alsa_stream->idx = idx; err =bcm2835_audio_open (alsa_stream);
@@ -197,7 +197,7 @@ static int snd_bcm2835_playback_close(struct snd_pcm_substream *substream)/* hw_params callback */ static int snd_bcm2835_pcm_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params) +struct snd_pcm_hw_params *params) {return snd_pcm_lib_malloc_pages (substream,params_buffer_bytes (params)); }
@@ -232,7 +232,8 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)if (err <0 )return err; -memset (&alsa_stream->pcm_indirect,0 ,sizeof (alsa_stream->pcm_indirect)); +memset (&alsa_stream->pcm_indirect,0 , +sizeof (alsa_stream->pcm_indirect)); alsa_stream->pcm_indirect.hw_buffer_size = alsa_stream->pcm_indirect.sw_buffer_size =
@@ -248,11 +249,11 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) }static void snd_bcm2835_pcm_transfer (struct snd_pcm_substream *substream, -struct snd_pcm_indirect *rec,size_t bytes) +struct snd_pcm_indirect *rec,size_t bytes) {struct snd_pcm_runtime *runtime = substream->runtime;struct bcm2835_alsa_stream *alsa_stream = runtime->private_data; -void *src = (void *) (substream->runtime->dma_area + rec->sw_data); +void *src = (void *)(substream->runtime->dma_area + rec->sw_data);bcm2835_audio_write (alsa_stream, bytes, src); }
@@ -349,7 +350,9 @@ int snd_bcm2835_new_pcm(struct bcm2835_chip *chip, const char *name, &snd_bcm2835_playback_ops);snd_pcm_lib_preallocate_pages_for_all (pcm,SNDRV_DMA_TYPE_DEV , - chip->card->dev,128 *1024 ,128 *1024 ); + chip->card->dev, +128 *1024 , +128 *1024 );if (spdif) chip->pcm_spdif = pcm;
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +30 -29
130 lines not on this page · raw message
drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +2 -2
@@ -61,7 +61,7 @@ struct bcm2835_chip {unsigned int opened;unsigned int spdif_status; -struct mutex audio_mutex; +struct mutex audio_mutex;/* generic mutex for VCHIQ audio driver */ struct bcm2835_vchi_ctx *vchi_ctx; };
@@ -107,6 +107,6 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, void *src);void bcm2835_playback_fifo (struct bcm2835_alsa_stream *alsa_stream,unsigned int size); -unsigned int bcm2835_audio_retrieve_buffers (struct bcm2835_alsa_stream *alsa_stream); +unsigned int bcm2835_audio_retrieve_buffers (struct bcm2835_alsa_stream *stream);#endif /* __SOUND_ARM_BCM2835_H */
Signature · 1 line
2.19.1
[email protected]
maintainerQuoted 1 line · Arnold Chand
Fixed warnings provided by checkpatch.pl
Please be much more specific as to what you changed or "fixed".
Please fix this up and resend.
thanks,
greg k-h