Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-04-24 22:05, Andy Shevchenko wrote:
>> +{
>> +	int ret;
>> +	struct adc1x8s102_state *st;
>> +
>> +	st = iio_priv(indio_dev);
>> +
>> +	switch (m) {
>> +	case IIO_CHAN_INFO_RAW:
>> +		mutex_lock(&indio_dev->mlock);
>> +		if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED)
>> {
>> +			ret = -EBUSY;
> 
>> +			dev_warn(&st->spi->dev,
>> +			 "indio_dev->currentmode is
>> INDIO_BUFFER_TRIGGERED\n");
> 
> Indentation?

Actually, this block needs to be converted to
iio_device_claim_direct_mode / iio_device_release_direct_mode, instead
of doing the old open-coded locking way.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux