Commit 938ca36e authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

[media] af9013: change & to &&

This is just a cleanup, it doesn't change how the code works.  These
are compound conditions and not bitwise operations so it should be &&
and not &.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 27b93d8a
...@@ -120,8 +120,8 @@ static int af9013_wr_regs(struct af9013_state *priv, u16 reg, const u8 *val, ...@@ -120,8 +120,8 @@ static int af9013_wr_regs(struct af9013_state *priv, u16 reg, const u8 *val,
int ret, i; int ret, i;
u8 mbox = (0 << 7)|(0 << 6)|(1 << 1)|(1 << 0); u8 mbox = (0 << 7)|(0 << 6)|(1 << 1)|(1 << 0);
if ((priv->config.ts_mode == AF9013_TS_USB) & if ((priv->config.ts_mode == AF9013_TS_USB) &&
((reg & 0xff00) != 0xff00) & ((reg & 0xff00) != 0xae00)) { ((reg & 0xff00) != 0xff00) && ((reg & 0xff00) != 0xae00)) {
mbox |= ((len - 1) << 2); mbox |= ((len - 1) << 2);
ret = af9013_wr_regs_i2c(priv, mbox, reg, val, len); ret = af9013_wr_regs_i2c(priv, mbox, reg, val, len);
} else { } else {
...@@ -142,8 +142,8 @@ static int af9013_rd_regs(struct af9013_state *priv, u16 reg, u8 *val, int len) ...@@ -142,8 +142,8 @@ static int af9013_rd_regs(struct af9013_state *priv, u16 reg, u8 *val, int len)
int ret, i; int ret, i;
u8 mbox = (0 << 7)|(0 << 6)|(1 << 1)|(0 << 0); u8 mbox = (0 << 7)|(0 << 6)|(1 << 1)|(0 << 0);
if ((priv->config.ts_mode == AF9013_TS_USB) & if ((priv->config.ts_mode == AF9013_TS_USB) &&
((reg & 0xff00) != 0xff00) & ((reg & 0xff00) != 0xae00)) { ((reg & 0xff00) != 0xff00) && ((reg & 0xff00) != 0xae00)) {
mbox |= ((len - 1) << 2); mbox |= ((len - 1) << 2);
ret = af9013_rd_regs_i2c(priv, mbox, reg, val, len); ret = af9013_rd_regs_i2c(priv, mbox, reg, val, len);
} else { } else {
......
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