From: Jarkko Nikula <jhnikula@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH] ASoC: Fix I2C component device id number creation
Date: Tue, 19 Oct 2010 11:10:45 +0300 [thread overview]
Message-ID: <1287475845-16230-1-git-send-email-jhnikula@gmail.com> (raw)
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
next reply other threads:[~2010-10-19 8:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 8:10 Jarkko Nikula [this message]
2010-10-19 10:02 ` [PATCH] ASoC: Fix I2C component device id number creation Liam Girdwood
2010-10-19 10:16 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287475845-16230-1-git-send-email-jhnikula@gmail.com \
--to=jhnikula@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.