summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/go7007/Makefile4
-rw-r--r--drivers/staging/go7007/go7007-driver.c2
-rw-r--r--drivers/staging/go7007/go7007-usb.c2
-rw-r--r--drivers/staging/go7007/s2250-board.c57
-rw-r--r--drivers/staging/go7007/s2250-loader.c12
5 files changed, 27 insertions, 50 deletions
diff --git a/drivers/staging/go7007/Makefile b/drivers/staging/go7007/Makefile
index 1301caa..d37b7ed 100644
--- a/drivers/staging/go7007/Makefile
+++ b/drivers/staging/go7007/Makefile
@@ -5,7 +5,7 @@
obj-$(CONFIG_VIDEO_GO7007) += go7007.o
obj-$(CONFIG_VIDEO_GO7007_USB) += go7007-usb.o
-obj-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD) += s2250.o
+obj-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD) += s2250.o s2250-loader.o
obj-$(CONFIG_VIDEO_GO7007_SAA7113) += wis-saa7113.o
obj-$(CONFIG_VIDEO_GO7007_OV7640) += wis-ov7640.o
obj-$(CONFIG_VIDEO_GO7007_SAA7115) += wis-saa7115.o
@@ -17,7 +17,7 @@ obj-$(CONFIG_VIDEO_GO7007_TW2804) += wis-tw2804.o
go7007-objs += go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \
snd-go7007.o
-s2250-objs += s2250-board.o s2250-loader.o
+s2250-objs += s2250-board.o
# Uncomment when the saa7134 patches get into upstream
#ifneq ($(CONFIG_VIDEO_SAA7134),)
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c
index 869430e..c5dc3b6 100644
--- a/drivers/staging/go7007/go7007-driver.c
+++ b/drivers/staging/go7007/go7007-driver.c
@@ -219,7 +219,7 @@ static int init_i2c_module(struct i2c_adapter *adapter, const char *type,
modname = "wis-ov7640";
break;
case I2C_DRIVERID_S2250:
- modname = "s2250-board";
+ modname = "s2250";
break;
default:
modname = NULL;
diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c
index f17e7b3..1e89dc0 100644
--- a/drivers/staging/go7007/go7007-usb.c
+++ b/drivers/staging/go7007/go7007-usb.c
@@ -425,7 +425,7 @@ static struct go7007_usb_board board_sensoray_2250 = {
.num_i2c_devs = 1,
.i2c_devs = {
{
- .type = "s2250_board",
+ .type = "s2250",
.id = I2C_DRIVERID_S2250,
.addr = 0x43,
},
diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c
index f4a6541..a69f768 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");
diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c
index d7bf829..c152ab9 100644
--- a/drivers/staging/go7007/s2250-loader.c
+++ b/drivers/staging/go7007/s2250-loader.c
@@ -162,7 +162,7 @@ static struct usb_driver s2250loader_driver = {
.id_table = s2250loader_ids,
};
-int s2250loader_init(void)
+static int __init s2250loader_init(void)
{
int r;
unsigned i = 0;
@@ -179,11 +179,15 @@ int s2250loader_init(void)
printk(KERN_INFO "s2250loader_init: driver registered\n");
return 0;
}
-EXPORT_SYMBOL(s2250loader_init);
+module_init(s2250loader_init);
-void s2250loader_cleanup(void)
+static void __exit s2250loader_cleanup(void)
{
printk(KERN_INFO "s2250loader_cleanup\n");
usb_deregister(&s2250loader_driver);
}
-EXPORT_SYMBOL(s2250loader_cleanup);
+module_exit(s2250loader_cleanup);
+
+MODULE_AUTHOR("");
+MODULE_DESCRIPTION("firmware loader for Sensoray 2250/2251");
+MODULE_LICENSE("GPL v2");
OpenPOWER on IntegriCloud