X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fsaa711x.c;h=708fae51e8ee61555c18ab4f1bae967a9ec8470a;hb=4854c7b27f0975a2b629f35ea3996d2968eb7c4f;hp=59e13fdea7804381cd9fc35cef3aa4229aa7db8d;hpb=927fe18397b3b1194a5b26b1d388d97e391e5fd2;p=linux-2.6-omap-h63xx.git diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c index 59e13fdea78..708fae51e8e 100644 --- a/drivers/media/video/saa711x.c +++ b/drivers/media/video/saa711x.c @@ -45,21 +45,20 @@ MODULE_AUTHOR("Dave Perks, Jose Ignacio Gijon, Joerg Heckenbach, Mark McClelland MODULE_LICENSE("GPL"); #include -#include #define I2C_NAME(s) (s)->name #include static int debug = 0; -MODULE_PARM(debug, "i"); +module_param(debug, int, 0644); MODULE_PARM_DESC(debug, " Set the default Debug level. Default: 0 (Off) - (0-1)"); #define dprintk(num, format, args...) \ do { \ if (debug >= num) \ - printk(format , ##args); \ + printk(format, ##args); \ } while (0) /* ----------------------------------------------------------------------- */ @@ -487,21 +486,18 @@ saa711x_detect_client (struct i2c_adapter *adapter, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == 0) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_saa711x; - client->flags = I2C_CLIENT_ALLOW_USE; strlcpy(I2C_NAME(client), "saa711x", sizeof(I2C_NAME(client))); - decoder = kmalloc(sizeof(struct saa711x), GFP_KERNEL); + decoder = kzalloc(sizeof(struct saa711x), GFP_KERNEL); if (decoder == NULL) { kfree(client); return -ENOMEM; } - memset(decoder, 0, sizeof(struct saa711x)); decoder->norm = VIDEO_MODE_NTSC; decoder->input = 0; decoder->enable = 1; @@ -565,12 +561,10 @@ saa711x_detach_client (struct i2c_client *client) /* ----------------------------------------------------------------------- */ static struct i2c_driver i2c_driver_saa711x = { - .owner = THIS_MODULE, - .name = "saa711x", - + .driver = { + .name = "saa711x", + }, .id = I2C_DRIVERID_SAA711X, - .flags = I2C_DF_NOTIFY, - .attach_adapter = saa711x_attach_adapter, .detach_client = saa711x_detach_client, .command = saa711x_command,