ASoC: Fix I2C component device id number creation
PATCH 1/1 ASoC: Fix I2C component device id number creation
Use bitwise AND instead of logical AND when masking.
Signed-off-by Jarkko Nikula <[email protected]>
---
Random note, not known to cause any problems at the moment as id field of codec seems to be unused.
--- sound/soc/soc-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +1 -1
@@ -2892,7 +2892,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);
Signature · 1 line
1.7.1
Quoted 15 lines · Jarkko Nikula
Use bitwise AND instead of logical AND when masking.
Signed-off-by Jarkko Nikula <[email protected]>---
Random note, not known to cause any problems at the moment as id field of codec seems to be unused.--- sound/soc/soc-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/soc-core.c +0
-0
sound/soc/soc-core.c static inline char *fmt_single_name(struct device *dev, int *id) · line 2898
Quoted 8 lines
sound/soc/soc-core.c +1
-1@@ -2892,7 +2892,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);
Acked-by Liam Girdwood <[email protected]>
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 3 lines · Jarkko Nikula
Use bitwise AND instead of logical AND when masking.
Signed-off-by Jarkko Nikula <[email protected]>
Applied, thanks.