X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Ftea6420.c;h=5ea840401f21865120623691ecc0d20cc084decc;hb=bd355f8ae6577aa6b444ab76bb1dfeb1a7002d9f;hp=49dafc5e1e2f584219eefee65b9cbddca47e7ad0;hpb=868c522b1b75fd3fd3e6a636b4c344ac08edf13a;p=pandora-kernel.git diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index 49dafc5e1e2f..f350b6c24500 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "tea6420.h" MODULE_AUTHOR("Michael Hunold "); @@ -126,7 +125,7 @@ static int tea6420_probe(struct i2c_client *client, v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); + sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); if (sd == NULL) return -ENOMEM; v4l2_i2c_subdev_init(sd, client, &tea6420_ops); @@ -157,9 +156,25 @@ static const struct i2c_device_id tea6420_id[] = { }; MODULE_DEVICE_TABLE(i2c, tea6420_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = "tea6420", - .probe = tea6420_probe, - .remove = tea6420_remove, - .id_table = tea6420_id, +static struct i2c_driver tea6420_driver = { + .driver = { + .owner = THIS_MODULE, + .name = "tea6420", + }, + .probe = tea6420_probe, + .remove = tea6420_remove, + .id_table = tea6420_id, }; + +static __init int init_tea6420(void) +{ + return i2c_add_driver(&tea6420_driver); +} + +static __exit void exit_tea6420(void) +{ + i2c_del_driver(&tea6420_driver); +} + +module_init(init_tea6420); +module_exit(exit_tea6420);