Re: [PATCH 7/8] iio:magnetometer:bmc150_magn: expand mutex in trigger_handler

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

 



On 20/07/15 18:48, Tirdea, Irina wrote:
> 
> 
>> -----Original Message-----
>> From: Hartmut Knaack [mailto:knaack.h@xxxxxx]
>> Sent: 17 July, 2015 11:53
>> To: linux-iio@xxxxxxxxxxxxxxx
>> Cc: Jonathan Cameron; Lars-Peter Clausen; Peter Meerwald; Tirdea, Irina; Dogaru, Vlad
>> Subject: [PATCH 7/8] iio:magnetometer:bmc150_magn: expand mutex in trigger_handler
>>
>> Keep the mutex locked, until the content of data->buffer has been pushed
>> out.
>>
> 
> Looks good to me.
> 
> Acked-by: Irina Tirdea <irina.tirdea@xxxxxxxxx>
Applied to the togreg branch of iio.git.

Thanks,

> 
>> Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx>
>> ---
>>  drivers/iio/magnetometer/bmc150_magn.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
>> index ac0cdbde813b..bdcf49ee75df 100644
>> --- a/drivers/iio/magnetometer/bmc150_magn.c
>> +++ b/drivers/iio/magnetometer/bmc150_magn.c
>> @@ -664,7 +664,6 @@ static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p)
>>
>>  	mutex_lock(&data->mutex);
>>  	ret = bmc150_magn_read_xyz(data, data->buffer);
>> -	mutex_unlock(&data->mutex);
>>  	if (ret < 0)
>>  		goto err;
>>
>> @@ -672,6 +671,7 @@ static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p)
>>  					   pf->timestamp);
>>
>>  err:
>> +	mutex_unlock(&data->mutex);
>>  	iio_trigger_notify_done(indio_dev->trig);
>>
>>  	return IRQ_HANDLED;
>> --
>> 2.4.3
> 
> --
> 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
> 

--
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