Explorar o código

ASoC: Fix I2C component device id number creation

Use bitwise AND instead of logical AND when masking.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula %!s(int64=14) %!d(string=hai) anos
pai
achega
0589944661
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      sound/soc/soc-core.c

+ 1 - 1
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);