Skip to content

Commit

Permalink
i2c: bpmp-tegra: Ignore unknown I2C_M flags
Browse files Browse the repository at this point in the history
In order to not to start returning errors when new I2C_M flags are
added, change behavior to just ignore all flags that we don't know
about. This includes the I2C_M_DMA_SAFE flag that already exists but
causes -EINVAL to be returned for valid transactions.

Cc: [email protected] # v4.19+
Signed-off-by: Mikko Perttunen <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
cyndis authored and wsakernel committed Jan 17, 2021
1 parent 27b7c6e commit bc1c204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-tegra-bpmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
flags &= ~I2C_M_RECV_LEN;
}

return (flags != 0) ? -EINVAL : 0;
return 0;
}

/**
Expand Down

0 comments on commit bc1c204

Please sign in to comment.