vserver 1.9.5.x5
[linux-2.6.git] / drivers / media / video / dpc7146.c
index d542444..da94811 100644 (file)
 #define DPC_BOARD_CAN_DO_VBI(dev)   (dev->revision != 0) 
 
 static int debug = 0;
-MODULE_PARM(debug,"i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug verbosity");
 
-/* global variables */
-int dpc_num = 0;
+static int dpc_num = 0;
 
 #define DPC_INPUTS     2
 static struct v4l2_input dpc_inputs[DPC_INPUTS] = {
@@ -79,8 +78,8 @@ static struct saa7146_extension_ioctls ioctls[] = {
 
 struct dpc
 {
-       struct video_device     video_dev;
-       struct video_device     vbi_dev;
+       struct video_device     *video_dev;
+       struct video_device     *vbi_dev;
 
        struct i2c_adapter      i2c_adapter;    
        struct i2c_client       *saa7111a;
@@ -106,7 +105,11 @@ static int dpc_probe(struct saa7146_dev* dev)
           video port pins should be enabled here ?! */
        saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
 
-       saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480);
+       dpc->i2c_adapter = (struct i2c_adapter) {
+               .class = I2C_CLASS_TV_ANALOG,
+               .name = "dpc7146",
+       };
+       saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
        if(i2c_add_adapter(&dpc->i2c_adapter) < 0) {
                DEB_S(("cannot register i2c-device. skipping.\n"));
                kfree(dpc);
@@ -375,7 +378,7 @@ static struct saa7146_extension extension = {
        .irq_func       = NULL,
 };     
 
-int __init dpc_init_module(void) 
+static int __init dpc_init_module(void)
 {
        if( 0 != saa7146_register_extension(&extension)) {
                DEB_S(("failed to register extension.\n"));
@@ -385,7 +388,7 @@ int __init dpc_init_module(void)
        return 0;
 }
 
-void __exit dpc_cleanup_module(void) 
+static void __exit dpc_cleanup_module(void)
 {
        saa7146_unregister_extension(&extension);
 }