From: Jarkko Nikula Date: Tue, 19 Oct 2010 08:10:45 +0000 (+0300) Subject: ASoC: Fix I2C component device id number creation X-Git-Tag: v2.6.37-rc1~82^2~8^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0589944661b9a9b9692f455fbbfce5eeda8fa7b6;p=platform%2Fkernel%2Flinux-3.10.git 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 --- 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);