Commit 05899446 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown

ASoC: Fix I2C component device id number creation

Use bitwise AND instead of logical AND when masking.
Signed-off-by: default avatarJarkko Nikula <jhnikula@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e86e1244
...@@ -2929,7 +2929,7 @@ static inline char *fmt_single_name(struct device *dev, int *id) ...@@ -2929,7 +2929,7 @@ static inline char *fmt_single_name(struct device *dev, int *id)
char tmp[NAME_SIZE]; char tmp[NAME_SIZE];
/* create unique ID number from I2C addr and bus */ /* 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 */ /* sanitize component name for DAI link creation */
snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name); snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment