Commit 6275c231 authored by Federico Vaga's avatar Federico Vaga

fa-zio-drv.c: bugfix during in-range modification

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 0e9fe558
......@@ -273,11 +273,11 @@ static int zfad_conf_set(struct device *dev, struct zio_attribute *zattr,
reg = &zfad_regs[zattr->priv.addr];
break;
case ZFA_CHx_CTL_RANGE:
if (usr_val != 0x23 || usr_val != 0x11 ||
usr_val != 0x45 || usr_val != 0x00) {
if (usr_val != 0x23 && usr_val != 0x11 &&
usr_val != 0x45 && usr_val != 0x00) {
if (!enable_calibration)
return -EINVAL;
if ((usr_val != 0x40 || usr_val != 0x42 ||
if ((usr_val != 0x40 && usr_val != 0x42 &&
usr_val != 0x44))
return -EINVAL;
}
......
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