summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/t613.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-30 07:43:57 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-30 07:43:57 -0300
commit56e4c75fce1cca2ee4553fd47b31dc8b6d43d688 (patch)
treecf92072da97e8aea3315303ac188d4f8432d42a8 /linux/drivers/media/video/gspca/t613.c
parent937ba8f2a0dc3b8cdb98de9a48c256ad24427ac9 (diff)
parent9bcda4998b34e63d38d390763cdbda7706f033d9 (diff)
downloadmediapointer-dvb-s2-56e4c75fce1cca2ee4553fd47b31dc8b6d43d688.tar.gz
mediapointer-dvb-s2-56e4c75fce1cca2ee4553fd47b31dc8b6d43d688.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/gspca/t613.c')
-rw-r--r--linux/drivers/media/video/gspca/t613.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/linux/drivers/media/video/gspca/t613.c b/linux/drivers/media/video/gspca/t613.c
index 27bff51a0..c7673661a 100644
--- a/linux/drivers/media/video/gspca/t613.c
+++ b/linux/drivers/media/video/gspca/t613.c
@@ -391,7 +391,7 @@ static void reg_w(struct gspca_dev *gspca_dev,
NULL, 0, 500);
return;
}
- if (len <= sizeof gspca_dev->usb_buf) {
+ if (len <= USB_BUF_SZ) {
memcpy(gspca_dev->usb_buf, buffer, len);
usb_control_msg(gspca_dev->dev,
usb_sndctrlpipe(gspca_dev->dev, 0),
@@ -563,6 +563,13 @@ static int init_default_parameters(struct gspca_dev *gspca_dev)
return 0;
}
+/* this function is called at probe and resume time */
+static int sd_init(struct gspca_dev *gspca_dev)
+{
+ init_default_parameters(gspca_dev);
+ return 0;
+}
+
static void setbrightness(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
@@ -916,18 +923,6 @@ static void sd_start(struct gspca_dev *gspca_dev)
#endif
}
-static void sd_stopN(struct gspca_dev *gspca_dev)
-{
-}
-
-static void sd_stop0(struct gspca_dev *gspca_dev)
-{
-}
-
-static void sd_close(struct gspca_dev *gspca_dev)
-{
-}
-
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
struct gspca_frame *frame, /* target */
__u8 *data, /* isoc packet */
@@ -995,24 +990,14 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
return -EINVAL;
}
-/* this function is called at open time */
-static int sd_open(struct gspca_dev *gspca_dev)
-{
- init_default_parameters(gspca_dev);
- return 0;
-}
-
/* sub-driver description */
static const struct sd_desc sd_desc = {
.name = MODULE_NAME,
.ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls),
.config = sd_config,
- .open = sd_open,
+ .init = sd_init,
.start = sd_start,
- .stopN = sd_stopN,
- .stop0 = sd_stop0,
- .close = sd_close,
.pkt_scan = sd_pkt_scan,
.querymenu = sd_querymenu,
};