We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dec4d2 commit 7578847Copy full SHA for 7578847
drivers/iio/adc/mcp3911.c
@@ -248,7 +248,7 @@ static int mcp3911_write_raw(struct iio_dev *indio_dev,
248
break;
249
250
case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
251
- for (int i = 0; i < sizeof(mcp3911_osr_table); i++) {
+ for (int i = 0; i < ARRAY_SIZE(mcp3911_osr_table); i++) {
252
if (val == mcp3911_osr_table[i]) {
253
val = FIELD_PREP(MCP3911_CONFIG_OSR, i);
254
ret = mcp3911_update(adc, MCP3911_REG_CONFIG, MCP3911_CONFIG_OSR,
0 commit comments