diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-18 08:21:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-10-11 12:58:40 -0400 |
commit | 259a41d9ae8f3689742267f340ad2b159d00b302 (patch) | |
tree | 98f94d6f682e40c895ba13f7e426dabd07626cfd /Documentation/media | |
parent | da5516b5e81d45a96291823620f6c820178dc055 (diff) | |
download | op-kernel-dev-259a41d9ae8f3689742267f340ad2b159d00b302.zip op-kernel-dev-259a41d9ae8f3689742267f340ad2b159d00b302.tar.gz |
media: dvb_frontend: fix return values for FE_SET_PROPERTY
There are several problems with regards to the return of
FE_SET_PROPERTY. The original idea were to return per-property
return codes via tvp->result field, and to return an updated
set of values.
However, that never worked. What's actually implemented is:
- the FE_SET_PROPERTY implementation doesn't call .get_frontend
callback in order to get the actual parameters after return;
- the tvp->result field is only filled if there's no error.
So, it is always filled with zero;
- FE_SET_PROPERTY doesn't call memdup_user() nor any other
copy_to_user() function. So, any changes to the properties
will be lost;
- FE_SET_PROPERTY is declared as a write-only ioctl (IOW).
While we could fix the above, it could cause regressions.
So, let's just assume what the code really does, updating
the documentation accordingly and removing the logic that
would update the discarded tvp->result.
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media')
-rw-r--r-- | Documentation/media/uapi/dvb/fe-get-property.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/media/uapi/dvb/fe-get-property.rst b/Documentation/media/uapi/dvb/fe-get-property.rst index 948d2ba..b69741d 100644 --- a/Documentation/media/uapi/dvb/fe-get-property.rst +++ b/Documentation/media/uapi/dvb/fe-get-property.rst @@ -48,8 +48,11 @@ depends on the delivery system and on the device: - This call requires read/write access to the device. - - At return, the values are updated to reflect the actual parameters - used. +.. note:: + + At return, the values aren't updated to reflect the actual + parameters used. If the actual parameters are needed, an explicit + call to ``FE_GET_PROPERTY`` is needed. - ``FE_GET_PROPERTY:`` |