summaryrefslogtreecommitdiff
path: root/drivers/staging/go7007/s2250-board.c
diff options
context:
space:
mode:
authorPete Eberlein <pete@sensoray.com>2009-11-16 15:13:51 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:42:17 -0200
commit832b6a8917f050a9cbeeb69e080733128d562f59 (patch)
treeabcd8c463aa2c28cfe15cfeabb1ee676da204f81 /drivers/staging/go7007/s2250-board.c
parent694a101e6acb865f5405a95c358eea43c813cf24 (diff)
V4L/DVB (13456): s2250: Change module structure
The s2250-board i2c module was converted to use v4l2-i2c-drv.h in preparation for its subdev conversion. This change prevented the s2250-loader from being initialized within the same module due to the module_init and module_exit function definitions in v4l2-i2c-drv.h. Therefore, s2250-loader is now its own module, and the header for exporting s2250-loader functions is no longer needed. The s2250 i2c module name was "2220-board" in some places, and was changed to "s2250". Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/go7007/s2250-board.c')
-rw-r--r--drivers/staging/go7007/s2250-board.c57
1 files changed, 15 insertions, 42 deletions
diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c
index f4a6541c3e60..a69f7682295e 100644
--- a/drivers/staging/go7007/s2250-board.c
+++ b/drivers/staging/go7007/s2250-board.c
@@ -20,10 +20,13 @@
#include <linux/usb.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
+#include <media/v4l2-device.h>
#include <media/v4l2-common.h>
-#include "s2250-loader.h"
+#include <media/v4l2-i2c-drv.h>
#include "go7007-priv.h"
-#include "wis-i2c.h"
+
+MODULE_DESCRIPTION("Sensoray 2250/2251 i2c v4l2 subdev driver");
+MODULE_LICENSE("GPL v2");
#define TLV320_ADDRESS 0x34
#define VPX322_ADDR_ANALOGCONTROL1 0x02
@@ -575,7 +578,7 @@ static int s2250_probe(struct i2c_client *client,
dec->audio = audio;
i2c_set_clientdata(client, dec);
- printk(KERN_DEBUG
+ printk(KERN_INFO
"s2250: initializing video decoder on %s\n",
adapter->name);
@@ -649,45 +652,15 @@ static int s2250_remove(struct i2c_client *client)
}
static struct i2c_device_id s2250_id[] = {
- { "s2250_board", 0 },
+ { "s2250", 0 },
{ }
};
-
-static struct i2c_driver s2250_driver = {
- .driver = {
- .name = "Sensoray 2250 board driver",
- },
- .probe = s2250_probe,
- .remove = s2250_remove,
- .command = s2250_command,
- .id_table = s2250_id,
+MODULE_DEVICE_TABLE(i2c, s2250_id);
+
+static struct v4l2_i2c_driver_data v4l2_i2c_data = {
+ .name = "s2250",
+ .probe = s2250_probe,
+ .remove = s2250_remove,
+ .command = s2250_command,
+ .id_table = s2250_id,
};
-
-static int __init s2250_init(void)
-{
- int r;
-
- r = s2250loader_init();
- if (r < 0)
- return r;
-
- r = i2c_add_driver(&s2250_driver);
- if (r < 0)
- s2250loader_cleanup();
-
- return r;
-}
-
-static void __exit s2250_cleanup(void)
-{
- i2c_del_driver(&s2250_driver);
-
- s2250loader_cleanup();
-}
-
-module_init(s2250_init);
-module_exit(s2250_cleanup);
-
-MODULE_AUTHOR("");
-MODULE_DESCRIPTION("Board driver for Sensoryray 2250");
-MODULE_LICENSE("GPL v2");