Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Gwendal Grignou
Let's use Matthias CL. On Mon, Jul 15, 2019 at 4:17 PM Gwendal Grignou wrote: > > Sorry for the original mistake. I upload a patch at > https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1702884. > > On Mon, Jul 15, 2019 at 1:04 PM Matthias Kaehlcke wrote: > > > > Hi

Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Gwendal Grignou
Sorry for the original mistake. I upload a patch at https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1702884. On Mon, Jul 15, 2019 at 1:04 PM Matthias Kaehlcke wrote: > > Hi Benson, > > On Mon, Jul 15, 2019 at 12:55:57PM -0700, Benson Leung wrote: > > Hi Matthias, > > >

Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Matthias Kaehlcke
Hi Benson, On Mon, Jul 15, 2019 at 12:55:57PM -0700, Benson Leung wrote: > Hi Matthias, > > On Mon, Jul 15, 2019 at 12:10:17PM -0700, Matthias Kaehlcke wrote: > > Before doing any actual work cros_ec_accel_legacy_read() acquires > > a mutex, which is released at the end of the function. However

Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Benson Leung
Hi Matthias, On Mon, Jul 15, 2019 at 12:10:17PM -0700, Matthias Kaehlcke wrote: > Before doing any actual work cros_ec_accel_legacy_read() acquires > a mutex, which is released at the end of the function. However for > 'calibbias' channels the function returns directly, without releasing > the

Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Matthias Kaehlcke
On Mon, Jul 15, 2019 at 12:40:42PM -0700, Doug Anderson wrote: > Hi, > > On Mon, Jul 15, 2019 at 12:10 PM Matthias Kaehlcke wrote: > > > > Before doing any actual work cros_ec_accel_legacy_read() acquires > > a mutex, which is released at the end of the function. However for > > 'calibbias'

Re: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Doug Anderson
Hi, On Mon, Jul 15, 2019 at 12:10 PM Matthias Kaehlcke wrote: > > Before doing any actual work cros_ec_accel_legacy_read() acquires > a mutex, which is released at the end of the function. However for > 'calibbias' channels the function returns directly, without releasing > the lock. The next

[PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

2019-07-15 Thread Matthias Kaehlcke
Before doing any actual work cros_ec_accel_legacy_read() acquires a mutex, which is released at the end of the function. However for 'calibbias' channels the function returns directly, without releasing the lock. The next attempt to acquire the lock blocks forever. Instead of an explicit return