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-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver bugfixes from Greg KH:
"Nothing major here, just 4 small bugfixes that resolve some issues
reported for the IIO (staging and non-staging) and the tidspbridge
driver"

* tag 'staging-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: tidspbridge: fix an erroneous removal of parentheses
iio: of_iio_channel_get_by_name() returns non-null pointers for error legs
staging: iio/ad7291: fix error code in ad7291_probe()
iio:adc:ad799x: Fix reading and writing of event values, apply shift

+16 -8
+6 -2
drivers/iio/adc/ad799x.c
··· 427 427 int ret; 428 428 struct ad799x_state *st = iio_priv(indio_dev); 429 429 430 + if (val < 0 || val > RES_MASK(chan->scan_type.realbits)) 431 + return -EINVAL; 432 + 430 433 mutex_lock(&indio_dev->mlock); 431 434 ret = ad799x_i2c_write16(st, ad799x_threshold_reg(chan, dir, info), 432 - val); 435 + val << chan->scan_type.shift); 433 436 mutex_unlock(&indio_dev->mlock); 434 437 435 438 return ret; ··· 455 452 mutex_unlock(&indio_dev->mlock); 456 453 if (ret < 0) 457 454 return ret; 458 - *val = valin; 455 + *val = (valin >> chan->scan_type.shift) & 456 + RES_MASK(chan->scan_type.realbits); 459 457 460 458 return IIO_VAL_INT; 461 459 }
+4 -2
drivers/iio/inkern.c
··· 183 183 else if (name && index >= 0) { 184 184 pr_err("ERROR: could not get IIO channel %s:%s(%i)\n", 185 185 np->full_name, name ? name : "", index); 186 - return chan; 186 + return NULL; 187 187 } 188 188 189 189 /* ··· 193 193 */ 194 194 np = np->parent; 195 195 if (np && !of_get_property(np, "io-channel-ranges", NULL)) 196 - break; 196 + return NULL; 197 197 } 198 + 198 199 return chan; 199 200 } 200 201 ··· 318 317 if (channel != NULL) 319 318 return channel; 320 319 } 320 + 321 321 return iio_channel_get_sys(name, channel_name); 322 322 } 323 323 EXPORT_SYMBOL_GPL(iio_channel_get);
+2 -2
drivers/staging/iio/adc/ad7291.c
··· 465 465 struct ad7291_platform_data *pdata = client->dev.platform_data; 466 466 struct ad7291_chip_info *chip; 467 467 struct iio_dev *indio_dev; 468 - int ret = 0; 468 + int ret; 469 469 470 470 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip)); 471 471 if (!indio_dev) ··· 475 475 if (pdata && pdata->use_external_ref) { 476 476 chip->reg = devm_regulator_get(&client->dev, "vref"); 477 477 if (IS_ERR(chip->reg)) 478 - return ret; 478 + return PTR_ERR(chip->reg); 479 479 480 480 ret = regulator_enable(chip->reg); 481 481 if (ret)
+4 -2
drivers/staging/tidspbridge/core/tiomap3430.c
··· 280 280 OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL); 281 281 282 282 /* Wait until the state has moved to ON */ 283 - while (*pdata->dsp_prm_read(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST)& 284 - OMAP_INTRANSITION_MASK); 283 + while ((*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD, 284 + OMAP2_PM_PWSTST) & 285 + OMAP_INTRANSITION_MASK) 286 + ; 285 287 /* Disable Automatic transition */ 286 288 (*pdata->dsp_cm_write)(OMAP34XX_CLKSTCTRL_DISABLE_AUTO, 287 289 OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL);