diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 08:49:59 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 08:49:59 +0200 |
commit | c7f462c7cd345d35a4d2e493c82f589c6e5d1d2d (patch) | |
tree | 1dc8be9ffb926e372f4b0df53c9d1d3b467d919f | |
parent | a022c34c8938f0c3a97840b5b3ceffa0ef41f775 (diff) | |
download | mediapointer-dvb-s2-c7f462c7cd345d35a4d2e493c82f589c6e5d1d2d.tar.gz mediapointer-dvb-s2-c7f462c7cd345d35a4d2e493c82f589c6e5d1d2d.tar.bz2 |
v4l2-subdev: move s_standby from core to tuner.
From: Hans Verkuil <hverkuil@xs4all.nl>
s_standby is only used to put the tuner in powersaving mode, so move it
from core to tuner.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | linux/drivers/media/video/cx231xx/cx231xx-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-dvb.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 4 | ||||
-rw-r--r-- | linux/include/media/v4l2-subdev.h | 6 |
12 files changed, 15 insertions, 15 deletions
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-video.c b/linux/drivers/media/video/cx231xx/cx231xx-video.c index d53ddcb6a..c33921038 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-video.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-video.c @@ -2125,7 +2125,7 @@ static int cx231xx_v4l2_close(struct file *filp) } /* Save some power by putting tuner to sleep */ - call_all(dev, core, s_standby, 0); + call_all(dev, tuner, s_standby); /* do this before setting alternate! */ cx231xx_uninit_isoc(dev); diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c index 2bffcbc48..81fa577a6 100644 --- a/linux/drivers/media/video/cx23885/cx23885-core.c +++ b/linux/drivers/media/video/cx23885/cx23885-core.c @@ -876,7 +876,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) cx23885_i2c_register(&dev->i2c_bus[1]); cx23885_i2c_register(&dev->i2c_bus[2]); cx23885_card_setup(dev); - call_all(dev, core, s_standby, 0); + call_all(dev, tuner, s_standby); cx23885_ir_init(dev); if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) { diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c index dfb16b91e..c4c1d396c 100644 --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c @@ -674,7 +674,7 @@ static int dvb_register(struct cx23885_tsport *port) fe0->dvb.frontend->callback = cx23885_tuner_callback; /* Put the analog decoder in standby to keep it quiet */ - call_all(dev, core, s_standby, 0); + call_all(dev, tuner, s_standby); if (fe0->dvb.frontend->ops.analog_ops.standby) fe0->dvb.frontend->ops.analog_ops.standby(fe0->dvb.frontend); diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index a170dedbf..34327b62a 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -3082,7 +3082,7 @@ static void cx88_card_setup(struct cx88_core *core) ctl.fname); call_all(core, tuner, s_config, &xc2028_cfg); } - call_all(core, core, s_standby, 0); + call_all(core, tuner, s_standby); } /* ------------------------------------------------------------------ */ diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 3de497312..f32cece95 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -1175,7 +1175,7 @@ static int dvb_register(struct cx8802_dev *dev) fe1->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; /* Put the analog decoder in standby to keep it quiet */ - call_all(core, core, s_standby, 0); + call_all(core, tuner, s_standby); /* register everything */ return videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev, diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index ea3920c8a..a3fd7f643 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1157,7 +1157,7 @@ static int video_release(struct file *file) kfree(fh); if(atomic_dec_and_test(&dev->core->users)) - call_all(dev->core, core, s_standby, 0); + call_all(dev->core, tuner, s_standby); return 0; } diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 56c27b745..035fc8eaf 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -2244,7 +2244,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, em28xx_init_extension(dev); /* Save some power by putting tuner to sleep */ - v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_standby, 0); + v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby); return 0; diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index f5ca05aab..5d8fe3fe9 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1799,7 +1799,7 @@ static int em28xx_v4l2_close(struct file *filp) } /* Save some power by putting tuner to sleep */ - v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_standby, 0); + v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby); /* do this before setting alternate! */ em28xx_uninit_isoc(dev); diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 1bf7c3a1b..fbe741865 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1076,7 +1076,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, saa7134_irq_video_signalchange(dev); if (TUNER_ABSENT != dev->tuner_type) - saa_call_all(dev, core, s_standby, 0); + saa_call_all(dev, tuner, s_standby); /* register v4l devices */ if (saa7134_no_overlay > 0) diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index 8ad0c72d0..d7117b935 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1496,7 +1496,7 @@ static int video_release(struct file *file) saa_andorb(SAA7134_OFMT_DATA_A, 0x1f, 0); saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0); - saa_call_all(dev, core, s_standby, 0); + saa_call_all(dev, tuner, s_standby); if (fh->radio) saa_call_all(dev, core, ioctl, RDS_CMD_CLOSE, &cmd); diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index dda992109..4b68c5394 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -797,7 +797,7 @@ static int tuner_s_radio(struct v4l2_subdev *sd) return 0; } -static int tuner_s_standby(struct v4l2_subdev *sd, u32 standby) +static int tuner_s_standby(struct v4l2_subdev *sd) { struct tuner *t = to_tuner(sd); struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; @@ -1005,7 +1005,6 @@ static int tuner_command(struct i2c_client *client, unsigned cmd, void *arg) static const struct v4l2_subdev_core_ops tuner_core_ops = { .log_status = tuner_log_status, - .s_standby = tuner_s_standby, }; static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = { @@ -1017,6 +1016,7 @@ static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = { .g_frequency = tuner_g_frequency, .s_type_addr = tuner_s_type_addr, .s_config = tuner_s_config, + .s_standby = tuner_s_standby, }; static const struct v4l2_subdev_ops tuner_ops = { diff --git a/linux/include/media/v4l2-subdev.h b/linux/include/media/v4l2-subdev.h index 9a8535be1..c84ff88c9 100644 --- a/linux/include/media/v4l2-subdev.h +++ b/linux/include/media/v4l2-subdev.h @@ -96,14 +96,11 @@ struct v4l2_crystal_freq { s_gpio: set GPIO pins. Very simple right now, might need to be extended with a direction argument if needed. - - s_standby: puts tuner on powersaving state, disabling it, except for i2c. */ struct v4l2_subdev_core_ops { int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); int (*log_status)(struct v4l2_subdev *sd); int (*init)(struct v4l2_subdev *sd, u32 val); - int (*s_standby)(struct v4l2_subdev *sd, u32 standby); int (*reset)(struct v4l2_subdev *sd, u32 val); int (*s_gpio)(struct v4l2_subdev *sd, u32 val); int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); @@ -127,6 +124,8 @@ struct v4l2_subdev_core_ops { s_type_addr: sets tuner type and its I2C addr. s_config: sets tda9887 specific stuff, like port1, port2 and qss + + s_standby: puts tuner on powersaving state, disabling it, except for i2c. */ struct v4l2_subdev_tuner_ops { int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type); @@ -138,6 +137,7 @@ struct v4l2_subdev_tuner_ops { int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm); int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type); int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config); + int (*s_standby)(struct v4l2_subdev *sd); }; /* s_clock_freq: set the frequency (in Hz) of the audio clock output. |