X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fdpc7146.c;h=da9481198c5305c4a916d858c046f7d1eb0fd9f7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=d54244413805c92e59e52d46a806beaf1355d7b9;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index d54244413..da9481198 100644 --- a/drivers/media/video/dpc7146.c +++ b/drivers/media/video/dpc7146.c @@ -55,11 +55,10 @@ #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); }