Skip to content

Commit

Permalink
ASoC: Fix I2C component device id number creation
Browse files Browse the repository at this point in the history
Use bitwise AND instead of logical AND when masking.

Signed-off-by: Jarkko Nikula <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Jarkko Nikula authored and broonie committed Oct 19, 2010
1 parent e86e124 commit 0589944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0589944

Please sign in to comment.