diff mbox

[v2,1/3] ASoC: ssm2602: do not hardcode type to SSM2602

Message ID 1412019553-19342-1-git-send-email-stefan.kristiansson@saunalahti.fi (mailing list archive)
State Accepted
Commit fe2a08b3bf1a6e35c00e18843bc19aa1778432c3
Headers show

Commit Message

Stefan Kristiansson Sept. 29, 2014, 7:39 p.m. UTC
The correct type (SSM2602/SSM2603/SSM2604) is passed down
from the ssm2602_spi_probe()/ssm2602_spi_probe() functions,
so use that instead of hardcoding it to SSM2602 in
ssm2602_probe().

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
Changes in v2:
 - None, new in series.
---
 sound/soc/codecs/ssm2602.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Sept. 30, 2014, 12:38 p.m. UTC | #1
On Mon, Sep 29, 2014 at 10:39:13PM +0300, Stefan Kristiansson wrote:
> The correct type (SSM2602/SSM2603/SSM2604) is passed down
> from the ssm2602_spi_probe()/ssm2602_spi_probe() functions,
> so use that instead of hardcoding it to SSM2602 in
> ssm2602_probe().

Applied all, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 484b3bb..4021cd4 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -647,7 +647,7 @@  int ssm2602_probe(struct device *dev, enum ssm2602_type type,
 		return -ENOMEM;
 
 	dev_set_drvdata(dev, ssm2602);
-	ssm2602->type = SSM2602;
+	ssm2602->type = type;
 	ssm2602->regmap = regmap;
 
 	return snd_soc_register_codec(dev, &soc_codec_dev_ssm2602,