On 19/07/13 12:01, Sean Young wrote:
>> +int rval = 0;
>>
>> -return rdev->open(rdev);
>> +if (!rdev->users++)
>> +rval = rdev->open(rdev);
>> +
>> +if (rval)
>> +rdev->users--;
>> +
>> +return rval;
>
> This looks racey. Some locking is needed, I
On Fri, Jul 19, 2013 at 09:39:27AM +0100, Srinivas KANDAGATLA wrote:
> From: Srinivas Kandagatla
>
> This patch adds user count to rc_dev structure, the reason to add this
> new member is to allow other code like lirc to open rc device directly.
> In the existing code, rc device is only opened
From: Srinivas Kandagatla
This patch adds user count to rc_dev structure, the reason to add this
new member is to allow other code like lirc to open rc device directly.
In the existing code, rc device is only opened by input subsystem which
works ok if we have any input drivers to match. But in
From: Srinivas Kandagatla srinivas.kandaga...@st.com
This patch adds user count to rc_dev structure, the reason to add this
new member is to allow other code like lirc to open rc device directly.
In the existing code, rc device is only opened by input subsystem which
works ok if we have any input
On Fri, Jul 19, 2013 at 09:39:27AM +0100, Srinivas KANDAGATLA wrote:
From: Srinivas Kandagatla srinivas.kandaga...@st.com
This patch adds user count to rc_dev structure, the reason to add this
new member is to allow other code like lirc to open rc device directly.
In the existing code, rc
On 19/07/13 12:01, Sean Young wrote:
+int rval = 0;
-return rdev-open(rdev);
+if (!rdev-users++)
+rval = rdev-open(rdev);
+
+if (rval)
+rdev-users--;
+
+return rval;
This looks racey. Some locking is needed, I think rc_dev-lock should
6 matches
Mail list logo