* [PATCH] ASoC: Fix I2C component device id number creation
@ 2010-10-19 8:10 Jarkko Nikula
2010-10-19 10:02 ` Liam Girdwood
2010-10-19 10:16 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Nikula @ 2010-10-19 8:10 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Liam Girdwood
Use bitwise AND instead of logical AND when masking.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
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(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8751efd..fe9f20b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Fix I2C component device id number creation
2010-10-19 8:10 [PATCH] ASoC: Fix I2C component device id number creation Jarkko Nikula
@ 2010-10-19 10:02 ` Liam Girdwood
2010-10-19 10:16 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2010-10-19 10:02 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown
On Tue, 2010-10-19 at 11:10 +0300, Jarkko Nikula wrote:
> Use bitwise AND instead of logical AND when masking.
>
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
> ---
> 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(-)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 8751efd..fe9f20b 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -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 <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Fix I2C component device id number creation
2010-10-19 8:10 [PATCH] ASoC: Fix I2C component device id number creation Jarkko Nikula
2010-10-19 10:02 ` Liam Girdwood
@ 2010-10-19 10:16 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2010-10-19 10:16 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Liam Girdwood
On Tue, Oct 19, 2010 at 11:10:45AM +0300, Jarkko Nikula wrote:
> Use bitwise AND instead of logical AND when masking.
>
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-19 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 8:10 [PATCH] ASoC: Fix I2C component device id number creation Jarkko Nikula
2010-10-19 10:02 ` Liam Girdwood
2010-10-19 10:16 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).