From 0589944661b9a9b9692f455fbbfce5eeda8fa7b6 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 19 Oct 2010 11:10:45 +0300 Subject: [PATCH] ASoC: Fix I2C component device id number creation Use bitwise AND instead of logical AND when masking. Signed-off-by: Jarkko Nikula Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 63c80e6..862b1af 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2929,7 +2929,7 @@ static inline char *fmt_single_name(struct device *dev, int *id) char tmp[NAME_SIZE]; /* create unique ID number from I2C addr and bus */ - *id = ((id1 && 0xffff) << 16) + id2; + *id = ((id1 & 0xffff) << 16) + id2; /* sanitize component name for DAI link creation */ snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name); -- 2.7.4