diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-15 10:39:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-15 15:11:23 -0500 |
commit | ac89758697195a8155f3861a34f0b41c6e562fcb (patch) | |
tree | 67a97370b01558c8b691c6bc37192c133bde8cae | |
parent | 11e7651432405eeee833fe9d1307488df7a81cd3 (diff) |
Revert "[media] dvb_frontend: return -ENOTTY for unimplement IOCTL"
As reported by Klaus Schmidinger:
"In VDR I use an ioctl() call with FE_READ_UNCORRECTED_BLOCKS on a
device (using stb0899). After this call I check 'errno' for
EOPNOTSUPP to determine whether this device supports this call. This
used to work just fine, until a few months ago I noticed that my
devices using stb0899 didn't display their signal quality in VDR's OSD
any more. After further investigation I found that
ioctl(FE_READ_UNCORRECTED_BLOCKS) no longer returns EOPNOTSUPP, but
rather ENOTTY. And since I stop getting the signal quality in case
any unknown errno value appears, this broke my signal quality query
function."
While the changes reflect what is there at:
http://comments.gmane.org/gmane.linux.kernel/1235728
it does cause regression on userspace. So, revert it to stop the
damage.
This reverts commit 177ffe506cf8 ("[media] dvb_frontend: return -ENOTTY
for unimplement IOCTL").
Reported-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 49d95040096a..0223ad255cb4 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c | |||
@@ -1820,7 +1820,7 @@ static int dvb_frontend_ioctl(struct file *file, | |||
1820 | struct dvb_frontend *fe = dvbdev->priv; | 1820 | struct dvb_frontend *fe = dvbdev->priv; |
1821 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 1821 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
1822 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 1822 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
1823 | int err = -ENOTTY; | 1823 | int err = -EOPNOTSUPP; |
1824 | 1824 | ||
1825 | dev_dbg(fe->dvb->device, "%s: (%d)\n", __func__, _IOC_NR(cmd)); | 1825 | dev_dbg(fe->dvb->device, "%s: (%d)\n", __func__, _IOC_NR(cmd)); |
1826 | if (fepriv->exit != DVB_FE_NO_EXIT) | 1826 | if (fepriv->exit != DVB_FE_NO_EXIT) |
@@ -1938,7 +1938,7 @@ static int dvb_frontend_ioctl_properties(struct file *file, | |||
1938 | } | 1938 | } |
1939 | 1939 | ||
1940 | } else | 1940 | } else |
1941 | err = -ENOTTY; | 1941 | err = -EOPNOTSUPP; |
1942 | 1942 | ||
1943 | out: | 1943 | out: |
1944 | kfree(tvp); | 1944 | kfree(tvp); |
@@ -2071,7 +2071,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
2071 | struct dvb_frontend *fe = dvbdev->priv; | 2071 | struct dvb_frontend *fe = dvbdev->priv; |
2072 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 2072 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
2073 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 2073 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
2074 | int err = -ENOTTY; | 2074 | int err = -EOPNOTSUPP; |
2075 | 2075 | ||
2076 | switch (cmd) { | 2076 | switch (cmd) { |
2077 | case FE_GET_INFO: { | 2077 | case FE_GET_INFO: { |