Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66640898 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Takashi Iwai
Browse files

ALSA: ctxfi: changed void * to struct hw *



in the code we have void *hw and while using we are always typecasting
it to (struct hw *). it is better to use void type of pointer when we
store different types of pointer , but in this code we are only having
struct hw.
So changed all the relevant reference of void *hw to struct hw *hw,
without any modification of the existing code logic.
the next patch of the series will remove the typecasting which is
not required now.

Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7a7686bd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer)
	return 0;
}

int amixer_mgr_create(void *hw, struct amixer_mgr **ramixer_mgr)
int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr)
{
	int err;
	struct amixer_mgr *amixer_mgr;
@@ -449,7 +449,7 @@ static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum)
	return 0;
}

int sum_mgr_create(void *hw, struct sum_mgr **rsum_mgr)
int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr)
{
	int err;
	struct sum_mgr *sum_mgr;
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct sum_mgr {
};

/* Constructor and destructor of daio resource manager */
int sum_mgr_create(void *hw, struct sum_mgr **rsum_mgr);
int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr);
int sum_mgr_destroy(struct sum_mgr *sum_mgr);

/* Define the descriptor of a amixer resource */
@@ -90,7 +90,7 @@ struct amixer_mgr {
};

/* Constructor and destructor of amixer resource manager */
int amixer_mgr_create(void *hw, struct amixer_mgr **ramixer_mgr);
int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr);
int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr);

#endif /* CTAMIXER_H */
+2 −2
Original line number Diff line number Diff line
@@ -106,11 +106,11 @@ static struct {
			    .public_name = "Mixer"}
};

typedef int (*create_t)(void *, void **);
typedef int (*create_t)(struct hw *, void **);
typedef int (*destroy_t)(void *);

static struct {
	int (*create)(void *hw, void **rmgr);
	int (*create)(struct hw *hw, void **rmgr);
	int (*destroy)(void *mgr);
} rsc_mgr_funcs[NUM_RSCTYP] = {
	[SRC] 		= { .create 	= (create_t)src_mgr_create,
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ struct ct_atc {
	/* Don't touch! Used for internal object. */
	void *rsc_mgrs[NUM_RSCTYP]; /* chip resource managers */
	void *mixer;		/* internal mixer object */
	void *hw;		/* chip specific hardware access object */
	struct hw *hw;		/* chip specific hardware access object */
	void **daios;		/* digital audio io resources */
	void **pcm;		/* SUMs for collecting all pcm stream */
	void **srcs;		/* Sample Rate Converters for input signal */
+2 −2
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static struct dai_rsc_ops dai_ops = {

static int daio_rsc_init(struct daio *daio,
			 const struct daio_desc *desc,
			 void *hw)
			 struct hw *hw)
{
	int err;
	unsigned int idx_l, idx_r;
@@ -692,7 +692,7 @@ static int daio_mgr_commit_write(struct daio_mgr *mgr)
	return 0;
}

int daio_mgr_create(void *hw, struct daio_mgr **rdaio_mgr)
int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr)
{
	int err, i;
	struct daio_mgr *daio_mgr;
Loading