[media] dvb core: remove support for post FE legacy ioctl intercept
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Aug 2012 17:16:29 +0000 (14:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Aug 2012 10:33:30 +0000 (07:33 -0300)
This DVB_FE_IOCTL_POST isn't used, so remove it.

Also, intercepting ioctl's like that only works with legacy ioctl's,
due to the way it was implemented. so this design is broken.
Document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvbdev.h
drivers/media/dvb/dvb-usb-v2/mxl111sf.c

index aebcdf221ddacece9fd1413aa2c9906c836c88ba..746dfd86aeabe6943cbaaeff64a9083ac5fb6104 100644 (file)
@@ -2287,13 +2287,6 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
                break;
        };
 
-       if (fe->dvb->fe_ioctl_override) {
-               cb_err = fe->dvb->fe_ioctl_override(fe, cmd, parg,
-                                                   DVB_FE_IOCTL_POST);
-               if (cb_err < 0)
-                       return cb_err;
-       }
-
        return err;
 }
 
index fcc6ae98745e018588d21d83af953c6765aad85c..3b2c137b182c43b7ea824e8a19497e3eb1d1b954 100644 (file)
@@ -76,7 +76,6 @@ struct dvb_adapter {
         * after the core handles an ioctl:
         *
         * DVB_FE_IOCTL_PRE indicates that the ioctl has not yet been handled.
-        * DVB_FE_IOCTL_POST indicates that the ioctl has been handled.
         *
         * When DVB_FE_IOCTL_PRE is passed to the callback as the stage arg:
         *
@@ -86,14 +85,10 @@ struct dvb_adapter {
         * return a negative int to prevent dvb-core from handling the ioctl,
         *      and return that value as an error.
         *
-        * When DVB_FE_IOCTL_POST is passed to the callback as the stage arg:
-        *
-        * return 0 to allow the dvb_frontend ioctl handler to exit normally.
-        * return a negative int to cause the dvb_frontend ioctl handler to
-        *      return that value as an error.
+        * WARNING: Don't use it on newer drivers: this only affects DVBv3
+        * calls, and should be removed soon.
         */
 #define DVB_FE_IOCTL_PRE 0
-#define DVB_FE_IOCTL_POST 1
        int (*fe_ioctl_override)(struct dvb_frontend *fe,
                                 unsigned int cmd, void *parg,
                                 unsigned int stage);
index 1fb017ecee74a18cf92c498abb7066d37dfe5d83..861e0ae2abc53014f5311aefe145e6a2502adcea 100644 (file)
@@ -898,10 +898,6 @@ static int mxl111sf_fe_ioctl_override(struct dvb_frontend *fe,
                        break;
                }
                break;
-
-       case DVB_FE_IOCTL_POST:
-               /* no post-ioctl handling required */
-               break;
        }
        return err;
 };