ASoC: CX20442: fix issues pointed out by subsystem maintainer
The patch fixes some checkpatch identified issues and adds a comment about line discipline interaction to my driver code, as requested by Mark on my inital submission (thank you Mark for applying my imperfect patch anyway). It also fixes MODULE_ALIAS mismatch as used in my machine driver. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
committed by
Mark Brown
parent
4ce2f2fe61
commit
b84eab08a6
@@ -171,6 +171,9 @@ static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg,
|
||||
if (reg >= codec->reg_cache_size)
|
||||
return -EINVAL;
|
||||
|
||||
/* hw_write and control_data pointers required for talking to the modem
|
||||
* are expected to be set by the machine driver's line discipline
|
||||
* initialization code */
|
||||
if (!codec->hw_write || !codec->control_data)
|
||||
return -EIO;
|
||||
|
||||
@@ -310,13 +313,13 @@ static int cx20442_register(struct cx20442_priv *cx20442)
|
||||
|
||||
ret = snd_soc_register_codec(codec);
|
||||
if (ret != 0) {
|
||||
//dev_err(&dev->dev, "Failed to register codec: %d\n", ret);
|
||||
dev_err(&codec->dev, "Failed to register codec: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = snd_soc_register_dai(&cx20442_dai);
|
||||
if (ret != 0) {
|
||||
//dev_err(&dev->dev, "Failed to register DAI: %d\n", ret);
|
||||
dev_err(&codec->dev, "Failed to register DAI: %d\n", ret);
|
||||
goto err_codec;
|
||||
}
|
||||
|
||||
@@ -392,4 +395,4 @@ module_exit(cx20442_exit);
|
||||
MODULE_DESCRIPTION("ASoC CX20442-11 voice modem codec driver");
|
||||
MODULE_AUTHOR("Janusz Krzysztofik");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:cx20442-codec");
|
||||
MODULE_ALIAS("platform:cx20442");
|
||||
|
Reference in New Issue
Block a user