Commit 7ab1197d authored by Keerthi Reddy's avatar Keerthi Reddy Committed by Greg Kroah-Hartman
Browse files

staging: vc04_services: please do not use multiple blank lines



Blank lines use up extra space in file and makes the file
larger. So do not use multiple blanklines

Signed-off-by: default avatarKeerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37c64b74
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream)
	unsigned int consumed = 0;
	int new_period = 0;


	audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
		alsa_stream ? alsa_stream->substream : 0);

@@ -111,7 +110,6 @@ static int snd_bcm2835_playback_open_generic(
	int idx;
	int err;


	if (mutex_lock_interruptible(&chip->audio_mutex)) {
		audio_error("Interrupted whilst waiting for lock\n");
		return -EINTR;
@@ -184,7 +182,6 @@ static int snd_bcm2835_playback_open_generic(
out:
	mutex_unlock(&chip->audio_mutex);


	return err;
}

@@ -207,7 +204,6 @@ static int snd_bcm2835_playback_close(struct snd_pcm_substream *substream)
	struct snd_pcm_runtime *runtime;
	struct bcm2835_alsa_stream *alsa_stream;


	chip = snd_pcm_substream_chip(substream);
	if (mutex_lock_interruptible(&chip->audio_mutex)) {
		audio_error("Interrupted whilst waiting for lock\n");
@@ -259,7 +255,6 @@ static int snd_bcm2835_pcm_hw_params(struct snd_pcm_substream *substream,
	struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
	int err;


	err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
	if (err < 0) {
		audio_error
@@ -289,7 +284,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
	int channels;
	int err;


	if (mutex_lock_interruptible(&chip->audio_mutex))
		return -EINTR;

@@ -307,13 +301,11 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
	if (err < 0)
		audio_error(" error setting hw params\n");


	bcm2835_audio_setup(alsa_stream);

	/* in preparation of the stream, set the controls (volume level) of the stream */
	bcm2835_audio_set_ctls(alsa_stream->chip);


	memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));

	alsa_stream->pcm_indirect.hw_buffer_size =
@@ -364,7 +356,6 @@ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
	struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
	int err = 0;


	switch (cmd) {
	case SNDRV_PCM_TRIGGER_START:
		audio_debug("bcm2835_AUDIO_TRIGGER_START running=%d\n",
@@ -416,7 +407,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream)
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;


	audio_debug("pcm_pointer... (%d) hwptr=%d appl=%d pos=%d\n", 0,
		frames_to_bytes(runtime, runtime->status->hw_ptr),
		frames_to_bytes(runtime, runtime->control->appl_ptr),
@@ -493,7 +483,6 @@ int snd_bcm2835_new_pcm(struct bcm2835_chip *chip, u32 numchannels)
					      snd_bcm2835_playback_hw.buffer_bytes_max,
					      snd_bcm2835_playback_hw.buffer_bytes_max);


out:
	mutex_unlock(&chip->audio_mutex);

+0 −11
Original line number Diff line number Diff line
@@ -337,7 +337,6 @@ static int vc_vchi_audio_deinit(struct bcm2835_audio_instance *instance)
{
	unsigned int i;


	if (!instance) {
		LOG_ERR("%s: invalid handle %p\n", __func__, instance);

@@ -369,7 +368,6 @@ static int vc_vchi_audio_deinit(struct bcm2835_audio_instance *instance)

	kfree(instance);


	return 0;
}

@@ -382,7 +380,6 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
		(struct bcm2835_audio_instance *)alsa_stream->instance;
	int ret;


	LOG_INFO("%s: start\n", __func__);
	BUG_ON(instance);
	if (instance) {
@@ -443,7 +440,6 @@ int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
	int status;
	int ret;


	my_workqueue_init(alsa_stream);

	ret = bcm2835_audio_open_connection(alsa_stream);
@@ -491,7 +487,6 @@ static int bcm2835_audio_set_ctls_chan(struct bcm2835_alsa_stream *alsa_stream,
	int status;
	int ret;


	LOG_INFO(" Setting ALSA dest(%d), volume(%d)\n",
		 chip->dest, chip->volume);

@@ -575,7 +570,6 @@ int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream,
	int status;
	int ret;


	LOG_INFO(" Setting ALSA channels(%d), samplerate(%d), bits-per-sample(%d)\n",
		 channels, samplerate, bps);

@@ -636,7 +630,6 @@ int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream,
int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream)
{


	return 0;
}

@@ -647,7 +640,6 @@ static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream)
	int status;
	int ret;


	if (mutex_lock_interruptible(&instance->vchi_mutex)) {
		LOG_DBG("Interrupted whilst waiting for lock on (%d)\n",
			instance->num_connections);
@@ -684,7 +676,6 @@ static int bcm2835_audio_stop_worker(struct bcm2835_alsa_stream *alsa_stream)
	int status;
	int ret;


	if (mutex_lock_interruptible(&instance->vchi_mutex)) {
		LOG_DBG("Interrupted whilst waiting for lock on (%d)\n",
			instance->num_connections);
@@ -722,7 +713,6 @@ int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream)
	int status;
	int ret;


	my_workqueue_quit(alsa_stream);

	if (mutex_lock_interruptible(&instance->vchi_mutex)) {
@@ -780,7 +770,6 @@ static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream,
	int status;
	int ret;


	LOG_INFO(" Writing %d bytes from %p\n", count, src);

	if (mutex_lock_interruptible(&instance->vchi_mutex)) {
+0 −3
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ typedef struct opaque_vchi_connection_info_t VCHI_CONNECTION_STATE_T;

typedef struct vchi_connection_t VCHI_CONNECTION_T;


/******************************************************************************
 API
 *****************************************************************************/
@@ -212,7 +211,6 @@ typedef void * (*VCHI_BUFFER_ALLOCATE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_
// free memory allocated by buffer_allocate
typedef void   (*VCHI_BUFFER_FREE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, void * address);


/******************************************************************************
 System driver struct
 *****************************************************************************/
@@ -321,7 +319,6 @@ struct vchi_connection_t {
#endif
};


#endif /* CONNECTION_H_ */

/****************************** End of file **********************************/
+0 −5
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
#include "interface/vchi/vchi_cfg_internal.h"
#include "interface/vchi/vchi_common.h"


typedef enum message_event_type {
   MESSAGE_EVENT_NONE,
   MESSAGE_EVENT_NOP,
@@ -111,7 +110,6 @@ typedef struct rx_bulk_slotinfo_t {
   VCHI_FLAGS_T flags;
} RX_BULK_SLOTINFO_T;


/* ----------------------------------------------------------------------
 * each connection driver will have a pool of the following struct.
 *
@@ -155,7 +153,6 @@ typedef struct {

} MESSAGE_EVENT_T;


// callbacks
typedef void VCHI_MESSAGE_DRIVER_EVENT_CALLBACK_T( void *state );

@@ -163,7 +160,6 @@ typedef struct {
   VCHI_MESSAGE_DRIVER_EVENT_CALLBACK_T *event_callback;
} VCHI_MESSAGE_DRIVER_OPEN_T;


// handle to this instance of message driver (as returned by ->open)
typedef struct opaque_mhandle_t *VCHI_MDRIVER_HANDLE_T;

@@ -195,7 +191,6 @@ struct opaque_vchi_message_driver_t {
   void    (*debug)( VCHI_MDRIVER_HANDLE_T *handle );
};


#endif // _VCHI_MESSAGE_H_

/****************************** End of file ***********************************/
+0 −10
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@
#include "interface/vchi/connections/connection.h"
#include "vchi_mh.h"


/******************************************************************************
 Global defs
 *****************************************************************************/
@@ -92,7 +91,6 @@ typedef struct vchi_msg_vector_ex {
   } u;
} VCHI_MSG_VECTOR_EX_T;


// Construct an entry in a msg vector for a pointer (p) of length (l)
#define VCHI_VEC_POINTER(p,l)  VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } }

@@ -103,7 +101,6 @@ typedef struct vchi_msg_vector_ex {
#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] ))
#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF


// Opaque service information
struct opaque_vchi_service_t;

@@ -114,8 +111,6 @@ typedef struct {
   void *message;
} VCHI_HELD_MSG_T;



// structure used to provide the information needed to open a server or a client
typedef struct {
	struct vchi_version version;
@@ -162,7 +157,6 @@ extern "C" {
extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const VCHI_CONNECTION_API_T * function_table,
                                                   const VCHI_MESSAGE_DRIVER_T * low_level);


// Routine used to initialise the vchi on both local + remote connections
extern int32_t vchi_initialise( VCHI_INSTANCE_T *instance_handle );

@@ -185,7 +179,6 @@ extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *lengt
extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address);
extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle);


/******************************************************************************
 Global service API
 *****************************************************************************/
@@ -307,7 +300,6 @@ extern int32_t vchi_msg_iter_hold_next( VCHI_MSG_ITER_T *iter,
                                        uint32_t *msg_size, // }
                                        VCHI_HELD_MSG_T *message );


/******************************************************************************
 Global bulk API
 *****************************************************************************/
@@ -319,7 +311,6 @@ extern int32_t vchi_bulk_queue_receive( VCHI_SERVICE_HANDLE_T handle,
                                        VCHI_FLAGS_T flags,
                                        void *transfer_handle );


// Prepare interface for a transfer from the other side into relocatable memory.
int32_t vchi_bulk_queue_receive_reloc( const VCHI_SERVICE_HANDLE_T handle,
                                       VCHI_MEM_HANDLE_T h_dst,
@@ -335,7 +326,6 @@ extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle,
                                         VCHI_FLAGS_T flags,
                                         void *transfer_handle );


/******************************************************************************
 Configuration plumbing
 *****************************************************************************/
Loading