struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
- int cb_err, err = -EOPNOTSUPP;
-
- if (fe->dvb->fe_ioctl_override) {
- cb_err = fe->dvb->fe_ioctl_override(fe, cmd, parg,
- DVB_FE_IOCTL_PRE);
- if (cb_err < 0)
- return cb_err;
- if (cb_err > 0)
- return 0;
- /* fe_ioctl_override returning 0 allows
- * dvb-core to continue handling the ioctl */
- }
+ int err = -EOPNOTSUPP;
switch (cmd) {
case FE_GET_INFO: {
int mfe_shared; /* indicates mutually exclusive frontends */
struct dvb_device *mfe_dvbdev; /* frontend device in use */
struct mutex mfe_lock; /* access lock for thread creation */
-
- /* Allow the adapter/bridge driver to perform an action before and/or
- * after the core handles an ioctl:
- *
- * DVB_FE_IOCTL_PRE indicates that the ioctl has not yet been handled.
- *
- * When DVB_FE_IOCTL_PRE is passed to the callback as the stage arg:
- *
- * return 0 to allow dvb-core to handle the ioctl.
- * return a positive int to prevent dvb-core from handling the ioctl,
- * and exit without error.
- * return a negative int to prevent dvb-core from handling the ioctl,
- * and 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
- int (*fe_ioctl_override)(struct dvb_frontend *fe,
- unsigned int cmd, void *parg,
- unsigned int stage);
};
* @tuner_attach: called to attach the possible tuners
* @frontend_ctrl: called to power on/off active frontend
* @streaming_ctrl: called to start/stop the usb streaming of adapter
- * @fe_ioctl_override: frontend ioctl override. avoid using that is possible
* @init: called after adapters are created in order to finalize device
* configuration
* @exit: called when driver is unloaded
int (*tuner_attach) (struct dvb_usb_adapter *);
int (*frontend_ctrl) (struct dvb_frontend *, int);
int (*streaming_ctrl) (struct dvb_frontend *, int);
- int (*fe_ioctl_override) (struct dvb_frontend *,
- unsigned int, void *, unsigned int);
int (*init) (struct dvb_usb_device *);
void (*exit) (struct dvb_usb_device *);
int (*get_rc_config) (struct dvb_usb_device *, struct dvb_usb_rc *);
/* use exclusive FE lock if there is multiple shared FEs */
if (adap->fe[1])
adap->dvb_adap.mfe_shared = 1;
-
- adap->dvb_adap.fe_ioctl_override = d->props->fe_ioctl_override;
}
return 0;
if (dvb_attach(mxl111sf_tuner_attach, adap->fe[i], state,
&mxl_tuner_config) == NULL)
return -EIO;
+ adap->fe[i]->ops.read_signal_strength = adap->fe[i]->ops.tuner_ops.get_rf_strength;
}
return 0;
}
-static int mxl111sf_fe_ioctl_override(struct dvb_frontend *fe,
- unsigned int cmd, void *parg,
- unsigned int stage)
-{
- int err = 0;
-
- switch (stage) {
- case DVB_FE_IOCTL_PRE:
-
- switch (cmd) {
- case FE_READ_SIGNAL_STRENGTH:
- err = fe->ops.tuner_ops.get_rf_strength(fe, parg);
- /* If no error occurs, prevent dvb-core from handling
- * this IOCTL, otherwise return the error */
- if (0 == err)
- err = 1;
- break;
- }
- break;
- }
- return err;
-};
-
static u32 mxl111sf_i2c_func(struct i2c_adapter *adapter)
{
return I2C_FUNC_I2C;
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_ep4_streaming_ctrl,
.get_stream_config = mxl111sf_get_stream_config_dvbt,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_ep6_streaming_ctrl,
.get_stream_config = mxl111sf_get_stream_config_atsc,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_ep5_streaming_ctrl,
.get_stream_config = mxl111sf_get_stream_config_mh,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_streaming_ctrl_atsc_mh,
.get_stream_config = mxl111sf_get_stream_config_atsc_mh,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_streaming_ctrl_mercury,
.get_stream_config = mxl111sf_get_stream_config_mercury,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
.init = mxl111sf_init,
.streaming_ctrl = mxl111sf_streaming_ctrl_mercury_mh,
.get_stream_config = mxl111sf_get_stream_config_mercury_mh,
- .fe_ioctl_override = mxl111sf_fe_ioctl_override,
.num_adapters = 1,
.adapter = {
goto err;
}
adap->dvb_adap.priv = adap;
- adap->dvb_adap.fe_ioctl_override = adap->props.fe_ioctl_override;
if (adap->dev->props.read_mac_address) {
if (adap->dev->props.read_mac_address(adap->dev,adap->dvb_adap.proposed_mac) == 0)
int size_of_priv;
int (*frontend_ctrl) (struct dvb_frontend *, int);
- int (*fe_ioctl_override) (struct dvb_frontend *,
- unsigned int, void *, unsigned int);
int num_frontends;
struct dvb_usb_adapter_fe_properties fe[MAX_NO_OF_FE_PER_ADAP];
/* register everything */
ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port,
- &dev->pci->dev, adapter_nr, mfe_shared,
- NULL);
+ &dev->pci->dev, adapter_nr, mfe_shared);
if (ret)
goto frontend_detach;
/* register everything */
res = videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev,
- &dev->pci->dev, adapter_nr, mfe_shared, NULL);
+ &dev->pci->dev, adapter_nr, mfe_shared);
if (res)
goto frontend_detach;
return res;
/* register everything else */
ret = videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev,
- &dev->pci->dev, adapter_nr, 0, NULL);
+ &dev->pci->dev, adapter_nr, 0);
/* this sequence is necessary to make the tda1004x load its firmware
* and to enter analog mode of hybrid boards
struct device *device,
char *adapter_name,
short *adapter_nr,
- int mfe_shared,
- int (*fe_ioctl_override)(struct dvb_frontend *,
- unsigned int, void *, unsigned int))
+ int mfe_shared)
{
int result;
}
fe->adapter.priv = adapter_priv;
fe->adapter.mfe_shared = mfe_shared;
- fe->adapter.fe_ioctl_override = fe_ioctl_override;
return result;
}
void *adapter_priv,
struct device *device,
short *adapter_nr,
- int mfe_shared,
- int (*fe_ioctl_override)(struct dvb_frontend *,
- unsigned int, void *, unsigned int))
+ int mfe_shared)
{
struct list_head *list, *q;
struct videobuf_dvb_frontend *fe;
/* Bring up the adapter */
res = videobuf_dvb_register_adapter(f, module, adapter_priv, device,
- fe->dvb.name, adapter_nr, mfe_shared, fe_ioctl_override);
+ fe->dvb.name, adapter_nr, mfe_shared);
if (res < 0) {
printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res);
return res;
void *adapter_priv,
struct device *device,
short *adapter_nr,
- int mfe_shared,
- int (*fe_ioctl_override)(struct dvb_frontend *,
- unsigned int, void *, unsigned int));
+ int mfe_shared);
void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);