mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
ASoC: codecs: simplify aw87390_init() argument a bit
Just pass "aw87390" instead of the address of it. It's a bit simpler. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aQYKuQuKekmoUrHP@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f47e782c45
commit
164d1037c4
|
|
@ -360,7 +360,7 @@ static void aw87390_parse_channel_dt(struct aw87390 *aw87390)
|
|||
aw_dev->channel = channel_value;
|
||||
}
|
||||
|
||||
static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct regmap *regmap)
|
||||
static int aw87390_init(struct aw87390 *aw87390, struct i2c_client *i2c, struct regmap *regmap)
|
||||
{
|
||||
struct aw_device *aw_dev;
|
||||
unsigned int chip_id;
|
||||
|
|
@ -384,7 +384,7 @@ static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct
|
|||
if (!aw_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
(*aw87390)->aw_pa = aw_dev;
|
||||
aw87390->aw_pa = aw_dev;
|
||||
aw_dev->i2c = i2c;
|
||||
aw_dev->regmap = regmap;
|
||||
aw_dev->dev = &i2c->dev;
|
||||
|
|
@ -398,7 +398,7 @@ static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct
|
|||
aw_dev->prof_index = AW87390_INIT_PROFILE;
|
||||
aw_dev->status = AW87390_DEV_PW_OFF;
|
||||
|
||||
aw87390_parse_channel_dt(*aw87390);
|
||||
aw87390_parse_channel_dt(aw87390);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -426,7 +426,7 @@ static int aw87390_i2c_probe(struct i2c_client *i2c)
|
|||
"failed to init regmap\n");
|
||||
|
||||
/* aw pa init */
|
||||
ret = aw87390_init(&aw87390, i2c, aw87390->regmap);
|
||||
ret = aw87390_init(aw87390, i2c, aw87390->regmap);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user