Re: [PATCHv9 04/13] cec: expose the new connector info API

2019-06-25 Thread Hans Verkuil
On 6/25/19 4:58 PM, Dariusz Marcinkiewicz wrote: > Hi again. > On Tue, Jun 25, 2019 at 4:45 PM Hans Verkuil wrote: >> >> + mutex_lock(>lock); >> + if (copy_to_user(parg, >conn_info, sizeof(adap->conn_info))) >> + ret = -EFAULT; >> + mutex_unlock(>lock); >> +

Re: [PATCHv9 04/13] cec: expose the new connector info API

2019-06-25 Thread Dariusz Marcinkiewicz
Hi again. On Tue, Jun 25, 2019 at 4:45 PM Hans Verkuil wrote: > > + mutex_lock(>lock); > + if (copy_to_user(parg, >conn_info, sizeof(adap->conn_info))) > + ret = -EFAULT; > + mutex_unlock(>lock); > + return ret; > +} Shouldn't the lock be released before

[PATCHv9 04/13] cec: expose the new connector info API

2019-06-25 Thread Hans Verkuil
From: Dariusz Marcinkiewicz Until now the connector info API was a kernel-internal API only. This moves it to the public API and adds the new ioctl to retrieve this information. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-adap.c | 2 ++