diff options
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 37 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 4 |
2 files changed, 28 insertions, 13 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 0a03e02b119b..875597640d74 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -487,10 +487,34 @@ static int cx23885_dvb_set_frontend(struct dvb_frontend *fe, | |||
487 | } | 487 | } |
488 | break; | 488 | break; |
489 | } | 489 | } |
490 | return (port->set_frontend_save) ? | 490 | return 0; |
491 | port->set_frontend_save(fe, param) : -ENODEV; | ||
492 | } | 491 | } |
493 | 492 | ||
493 | static int cx23885_dvb_fe_ioctl_override(struct dvb_frontend *fe, | ||
494 | unsigned int cmd, void *parg, | ||
495 | unsigned int stage) | ||
496 | { | ||
497 | int err = 0; | ||
498 | |||
499 | switch (stage) { | ||
500 | case DVB_FE_IOCTL_PRE: | ||
501 | |||
502 | switch (cmd) { | ||
503 | case FE_SET_FRONTEND: | ||
504 | err = cx23885_dvb_set_frontend(fe, | ||
505 | (struct dvb_frontend_parameters *) parg); | ||
506 | break; | ||
507 | } | ||
508 | break; | ||
509 | |||
510 | case DVB_FE_IOCTL_POST: | ||
511 | /* no post-ioctl handling required */ | ||
512 | break; | ||
513 | } | ||
514 | return err; | ||
515 | }; | ||
516 | |||
517 | |||
494 | static struct lgs8gxx_config magicpro_prohdtve2_lgs8g75_config = { | 518 | static struct lgs8gxx_config magicpro_prohdtve2_lgs8g75_config = { |
495 | .prod = LGS8GXX_PROD_LGS8G75, | 519 | .prod = LGS8GXX_PROD_LGS8G75, |
496 | .demod_address = 0x19, | 520 | .demod_address = 0x19, |
@@ -550,12 +574,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
550 | 0x60, &dev->i2c_bus[1].i2c_adap, | 574 | 0x60, &dev->i2c_bus[1].i2c_adap, |
551 | &hauppauge_hvr127x_config); | 575 | &hauppauge_hvr127x_config); |
552 | } | 576 | } |
553 | |||
554 | /* FIXME: temporary hack */ | ||
555 | /* define bridge override to set_frontend */ | ||
556 | port->set_frontend_save = fe0->dvb.frontend->ops.set_frontend; | ||
557 | fe0->dvb.frontend->ops.set_frontend = cx23885_dvb_set_frontend; | ||
558 | |||
559 | break; | 577 | break; |
560 | case CX23885_BOARD_HAUPPAUGE_HVR1255: | 578 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
561 | i2c_bus = &dev->i2c_bus[0]; | 579 | i2c_bus = &dev->i2c_bus[0]; |
@@ -904,7 +922,8 @@ static int dvb_register(struct cx23885_tsport *port) | |||
904 | 922 | ||
905 | /* register everything */ | 923 | /* register everything */ |
906 | ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port, | 924 | ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port, |
907 | &dev->pci->dev, adapter_nr, 0, NULL); | 925 | &dev->pci->dev, adapter_nr, 0, |
926 | cx23885_dvb_fe_ioctl_override); | ||
908 | 927 | ||
909 | /* init CI & MAC */ | 928 | /* init CI & MAC */ |
910 | switch (dev->board) { | 929 | switch (dev->board) { |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 1e0e93548061..d2fbc6807ce9 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -297,10 +297,6 @@ struct cx23885_tsport { | |||
297 | /* Allow a single tsport to have multiple frontends */ | 297 | /* Allow a single tsport to have multiple frontends */ |
298 | u32 num_frontends; | 298 | u32 num_frontends; |
299 | void *port_priv; | 299 | void *port_priv; |
300 | |||
301 | /* FIXME: temporary hack */ | ||
302 | int (*set_frontend_save) (struct dvb_frontend *, | ||
303 | struct dvb_frontend_parameters *); | ||
304 | }; | 300 | }; |
305 | 301 | ||
306 | struct cx23885_dev { | 302 | struct cx23885_dev { |