]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (11368): v4l2-subdev: move s_standby from core to tuner.
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 1 Apr 2009 06:49:59 +0000 (03:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 7 Apr 2009 00:44:20 +0000 (21:44 -0300)
s_standby is only used to put the tuner in powersaving mode, so move it
from core to tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 files changed:
drivers/media/video/cx231xx/cx231xx-video.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/tuner-core.c
include/media/v4l2-subdev.h

index d660c08634a280d04b7eaedd0db3f7f824bfa6d5..ec5aea3134e635dae8ec9756f669ba82401c42d9 100644 (file)
@@ -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);
index dc7fff22cfdd5a0218547faf50036e0d1383915f..beda42925ce761c961e7b08673a195cd6e6017fe 100644 (file)
@@ -875,7 +875,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) {
index d43c7439676781fb35508d78ac05a3c76156dbf6..f48454ab3900897eb92fb16b492533dc622d9983 100644 (file)
@@ -673,7 +673,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);
index 0363971a23a83001140a012b66562f3b3ed01fb3..84ecfb291276f630652aee3bff5c9c9518d1f6b0 100644 (file)
@@ -3049,7 +3049,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);
 }
 
 /* ------------------------------------------------------------------ */
index 4ff4d9fe0355849f3c9879421cdf98bd4beb7c45..9389cf290c1bfc815b5752697eaf120babecbcd3 100644 (file)
@@ -1168,7 +1168,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,
index 434237af5184ec99632b454a195affc62a2ce78d..fb0764af6c77c7c328ff7c758f3e1e6f10b39a0b 100644 (file)
@@ -931,7 +931,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;
 }
index 0cd0134bcb4cb235d1acde436f20466ccae43e29..e7fc2d5b129e08e412d984d1416cf77d98770f5f 100644 (file)
@@ -2162,7 +2162,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;
 
index 6c09a37e404878ffdcb2ebe623feac6b15eaafa2..9d4e0c1e170a718adeb26db9bbffbafc3f08d2f7 100644 (file)
@@ -1737,7 +1737,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);
index dafa0d88bed09662cace3ba2e153b12f0163b695..ef15f1cb92e43c7ce23ecf395bbbc81f2f83317d 100644 (file)
@@ -1015,7 +1015,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)
index 404f70eeb355e9f7f6cd31ae55d494925fffd3f3..b520e9c2dac15f3dbb8021391b6ab68af6201e15 100644 (file)
@@ -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);
 
index 40bf980cd511ce05002d00f7583205b75a326cc2..61f100703456b689c48e1d2eb0418a0609a92a4a 100644 (file)
@@ -773,7 +773,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;
@@ -981,7 +981,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 = {
@@ -993,6 +992,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 = {
index 9a8535be1edf63153d7aee2a9d44be27ef9b0473..c84ff88c913f41c27a2f5bee1ad417663d3aa466 100644 (file)
@@ -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.