Messages in this thread | | | Subject | Re: [PATCH] iio: adc: Add support for TI ADC1x8s102 | From | Jan Kiszka <> | Date | Tue, 25 Apr 2017 08:06:01 +0200 |
| |
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
| |