Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
"Here are four small staging and iio driver fixes for 5.3-rc5

Two are for the dt3000 comedi driver for some reported problems found
in that codebase, and two are some small iio fixes.

All of these have been in linux-next this week with no reported
issues"

* tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: comedi: dt3000: Fix rounding up of timer divisor
staging: comedi: dt3000: Fix signed integer overflow 'divider * base'
iio: adc: max9611: Fix temperature reading in probe
iio: frequency: adf4371: Fix output frequency setting

+9 -9
+1 -1
drivers/iio/adc/max9611.c
··· 480 480 if (ret) 481 481 return ret; 482 482 483 - regval = ret & MAX9611_TEMP_MASK; 483 + regval &= MAX9611_TEMP_MASK; 484 484 485 485 if ((regval > MAX9611_TEMP_MAX_POS && 486 486 regval < MAX9611_TEMP_MIN_NEG) ||
+4 -4
drivers/iio/frequency/adf4371.c
··· 276 276 st->buf[0] = st->integer >> 8; 277 277 st->buf[1] = 0x40; /* REG12 default */ 278 278 st->buf[2] = 0x00; 279 - st->buf[3] = st->fract2 & 0xFF; 280 - st->buf[4] = st->fract2 >> 7; 281 - st->buf[5] = st->fract2 >> 15; 279 + st->buf[3] = st->fract1 & 0xFF; 280 + st->buf[4] = st->fract1 >> 8; 281 + st->buf[5] = st->fract1 >> 16; 282 282 st->buf[6] = ADF4371_FRAC2WORD_L(st->fract2 & 0x7F) | 283 - ADF4371_FRAC1WORD(st->fract1 >> 23); 283 + ADF4371_FRAC1WORD(st->fract1 >> 24); 284 284 st->buf[7] = ADF4371_FRAC2WORD_H(st->fract2 >> 7); 285 285 st->buf[8] = st->mod2 & 0xFF; 286 286 st->buf[9] = ADF4371_MOD2WORD(st->mod2 >> 8);
+4 -4
drivers/staging/comedi/drivers/dt3000.c
··· 342 342 static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec, 343 343 unsigned int flags) 344 344 { 345 - int divider, base, prescale; 345 + unsigned int divider, base, prescale; 346 346 347 - /* This function needs improvment */ 347 + /* This function needs improvement */ 348 348 /* Don't know if divider==0 works. */ 349 349 350 350 for (prescale = 0; prescale < 16; prescale++) { ··· 358 358 divider = (*nanosec) / base; 359 359 break; 360 360 case CMDF_ROUND_UP: 361 - divider = (*nanosec) / base; 361 + divider = DIV_ROUND_UP(*nanosec, base); 362 362 break; 363 363 } 364 364 if (divider < 65536) { ··· 368 368 } 369 369 370 370 prescale = 15; 371 - base = timer_base * (1 << prescale); 371 + base = timer_base * (prescale + 1); 372 372 divider = 65535; 373 373 *nanosec = divider * base; 374 374 return (prescale << 16) | (divider);