Re: [PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-24 Thread Laurent Pinchart
On Wednesday 16 Mar 2016 09:04:02 Mauro Carvalho Chehab wrote: > Right now, the lock schema for media_device struct is messy, > since sometimes, it is protected via a spin lock, while, for > media graph traversal, it is protected by a mutex. > > Solve this conflict by always using a mutex. > > As

Re: [PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-22 Thread Shuah Khan
On 03/16/2016 06:04 AM, Mauro Carvalho Chehab wrote: > Right now, the lock schema for media_device struct is messy, > since sometimes, it is protected via a spin lock, while, for > media graph traversal, it is protected by a mutex. > > Solve this conflict by always using a mutex. > > As a side ef

Re: [PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-19 Thread Sakari Ailus
Hi Mauro, On Wed, Mar 16, 2016 at 09:04:02AM -0300, Mauro Carvalho Chehab wrote: > Right now, the lock schema for media_device struct is messy, > since sometimes, it is protected via a spin lock, while, for > media graph traversal, it is protected by a mutex. > > Solve this conflict by always usi

[PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-19 Thread Mauro Carvalho Chehab
Right now, the lock schema for media_device struct is messy, since sometimes, it is protected via a spin lock, while, for media graph traversal, it is protected by a mutex. Solve this conflict by always using a mutex. As a side effect, this prevents a bug where the media notifiers were called at

Re: [PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-19 Thread Mauro Carvalho Chehab
Em Wed, 16 Mar 2016 09:53:12 -0300 Javier Martinez Canillas escreveu: > Hello Mauro, > > On Wed, Mar 16, 2016 at 9:04 AM, Mauro Carvalho Chehab > wrote: > > Right now, the lock schema for media_device struct is messy, > > since sometimes, it is protected via a spin lock, while, for > > media gr

Re: [PATCH 1/5] [media] media-device: get rid of the spinlock

2016-03-19 Thread Javier Martinez Canillas
Hello Mauro, On Wed, Mar 16, 2016 at 9:04 AM, Mauro Carvalho Chehab wrote: > Right now, the lock schema for media_device struct is messy, > since sometimes, it is protected via a spin lock, while, for > media graph traversal, it is protected by a mutex. > > Solve this conflict by always using a m