V4L/DVB (9120): gspca: sd_desc->start returns a value and static functions in m5602.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:19 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e66c64...
Commit:     e66c6419231cd61a1be04ef84bc6264556289e7d
Parent:     3145b8c1bfb96b02abf63dcd83ec7517c22cb574
Author:     Jean-Francois Moine <moinejf@free.fr>
AuthorDate: Sun Oct 5 04:46:11 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Sun Oct 12 09:37:15 2008 -0200

    V4L/DVB (9120): gspca: sd_desc->start returns a value and static functions in m5602.
    
    Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/video/gspca/m5602/m5602_bridge.h |   12 --------
 drivers/media/video/gspca/m5602/m5602_core.c   |   37 +++++++++++++----------
 2 files changed, 21 insertions(+), 28 deletions(-)

diff --git a/drivers/media/video/gspca/m5602/m5602_bridge.h b/drivers/media/video/gspca/m5602/m5602_bridge.h
index 18ca19a..c786d7d 100644
--- a/drivers/media/video/gspca/m5602/m5602_bridge.h
+++ b/drivers/media/video/gspca/m5602/m5602_bridge.h
@@ -167,16 +167,4 @@ int m5602_read_bridge(
 int m5602_write_bridge(
 	struct sd *sd, u8 address, u8 i2c_data);
 
-int m5602_configure(struct gspca_dev *gspca_dev,
-			   const struct usb_device_id *id);
-
-int m5602_init(struct gspca_dev *gspca_dev);
-
-void m5602_start_transfer(struct gspca_dev *gspca_dev);
-
-void m5602_stop_transfer(struct gspca_dev *gspca_dev);
-
-void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
-			__u8 *data, int len);
-
 #endif
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c
index 4750735..19d5e35 100644
--- a/drivers/media/video/gspca/m5602/m5602_core.c
+++ b/drivers/media/video/gspca/m5602/m5602_core.c
@@ -35,16 +35,6 @@ static const __devinitdata struct usb_device_id m5602_table[] = {
 
 MODULE_DEVICE_TABLE(usb, m5602_table);
 
-/* sub-driver description, the ctrl and nctrl is filled at probe time */
-static struct sd_desc sd_desc = {
-	.name		= MODULE_NAME,
-	.config		= m5602_configure,
-	.init		= m5602_init,
-	.start		= m5602_start_transfer,
-	.stopN		= m5602_stop_transfer,
-	.pkt_scan	= m5602_urb_complete
-};
-
 /* Reads a byte from the m5602 */
 int m5602_read_bridge(struct sd *sd, u8 address, u8 *i2c_data)
 {
@@ -104,7 +94,7 @@ static void m5602_dump_bridge(struct sd *sd)
 	info("Warning: The camera probably won't work until it's power cycled");
 }
 
-int m5602_probe_sensor(struct sd *sd)
+static int m5602_probe_sensor(struct sd *sd)
 {
 	/* Try the po1030 */
 	sd->sensor = &po1030;
@@ -137,7 +127,10 @@ int m5602_probe_sensor(struct sd *sd)
 	return -ENODEV;
 }
 
-int m5602_init(struct gspca_dev *gspca_dev)
+static int m5602_configure(struct gspca_dev *gspca_dev,
+			   const struct usb_device_id *id);
+
+static int m5602_init(struct gspca_dev *gspca_dev)
 {
 	struct sd *sd = (struct sd *) gspca_dev;
 	int err;
@@ -149,7 +142,7 @@ int m5602_init(struct gspca_dev *gspca_dev)
 	return err;
 }
 
-void m5602_start_transfer(struct gspca_dev *gspca_dev)
+static int m5602_start_transfer(struct gspca_dev *gspca_dev)
 {
 	struct sd *sd = (struct sd *) gspca_dev;
 	__u8 *buf = sd->gspca_dev.usb_buf;
@@ -162,9 +155,11 @@ void m5602_start_transfer(struct gspca_dev *gspca_dev)
 			4, M5602_URB_MSG_TIMEOUT);
 
 	PDEBUG(DBG_V4L2, "Transfer started");
+	return 0;
 }
 
-void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
+static void m5602_urb_complete(struct gspca_dev *gspca_dev,
+			struct gspca_frame *frame,
 			__u8 *data, int len)
 {
 	struct sd *sd = (struct sd *) gspca_dev;
@@ -216,13 +211,23 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
 	}
 }
 
-void m5602_stop_transfer(struct gspca_dev *gspca_dev)
+static void m5602_stop_transfer(struct gspca_dev *gspca_dev)
 {
 	/* Is there are a command to stop a data transfer? */
 }
 
+/* sub-driver description, the ctrl and nctrl is filled at probe time */
+static struct sd_desc sd_desc = {
+	.name		= MODULE_NAME,
+	.config		= m5602_configure,
+	.init		= m5602_init,
+	.start		= m5602_start_transfer,
+	.stopN		= m5602_stop_transfer,
+	.pkt_scan	= m5602_urb_complete
+};
+
 /* this function is called at probe time */
-int m5602_configure(struct gspca_dev *gspca_dev,
+static int m5602_configure(struct gspca_dev *gspca_dev,
 			   const struct usb_device_id *id)
 {
 	struct sd *sd = (struct sd *) gspca_dev;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (9120): gspca: sd_desc->start returns a value and ..., Linux Kernel Mailing ..., (Mon Oct 13, 3:19 pm)