[PATCH 1/2] Staging: iio: ade7758: Remove iio_dev mlock

Ardelean, Alexandru alexandru.Ardelean at analog.com
Tue Feb 6 07:23:17 UTC 2018


On Tue, 2018-02-06 at 01:08 +0530, Shreeya Patel wrote:
> In the ade7758 file, read raw does not require iio_dev->mlock for
> reads. It can run concurrently as resource protection is handled
> by buf_lock in read register.

Removed linux-kernel list and Greg from reply list.

> 
> Signed-off-by: Shreeya Patel <shreeya.patel23498 at gmail.com>
> ---
>  drivers/staging/iio/meter/ade7758_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c
> index 7b7ffe5..227dbfc 100644
> --- a/drivers/staging/iio/meter/ade7758_core.c
> +++ b/drivers/staging/iio/meter/ade7758_core.c
> @@ -526,9 +526,7 @@ static int ade7758_read_raw(struct iio_dev *indio_dev,
>  
>  	switch (mask) {
>  	case IIO_CHAN_INFO_SAMP_FREQ:
> -		mutex_lock(&indio_dev->mlock);
>  		ret = ade7758_read_samp_freq(&indio_dev->dev, val);
> -		mutex_unlock(&indio_dev->mlock);

this patch can be squashed into the second one
semantically they are the same

>  		return ret;
>  	default:
>  		return -EINVAL;


More information about the devel mailing list