summaryrefslogtreecommitdiff
path: root/drivers/staging/easycap/easycap_low.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2011-03-06 00:55:20 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-07 13:52:55 -0800
commitfd49b7879890d0f17c1cb86eb07e449d9c9f0699 (patch)
tree8880dfc052bb0ee13931ca08929aafd13505de6b /drivers/staging/easycap/easycap_low.c
parent4495c15f29a11c41d0a69a6e848307b0db7cc196 (diff)
staging/easycap: wait_i2c should be static
wait_i2c is only used from easycap_low.c so remove it from the easycap.h and mark it static Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/easycap/easycap_low.c')
-rw-r--r--drivers/staging/easycap/easycap_low.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/drivers/staging/easycap/easycap_low.c b/drivers/staging/easycap/easycap_low.c
index 403415ee191d..8e4e11f12cd7 100644
--- a/drivers/staging/easycap/easycap_low.c
+++ b/drivers/staging/easycap/easycap_low.c
@@ -323,7 +323,36 @@ static int regset(struct usb_device *pusb_device, u16 index, u16 value)
return rc;
}
-/*****************************************************************************/
+/*--------------------------------------------------------------------------*/
+/*
+ * FUNCTION wait_i2c() RETURNS 0 ON SUCCESS
+*/
+/*--------------------------------------------------------------------------*/
+static int wait_i2c(struct usb_device *p)
+{
+ u16 get0;
+ u8 igot;
+ const int max = 2;
+ int k;
+
+ if (!p)
+ return -ENODEV;
+
+ for (k = 0; k < max; k++) {
+ GET(p, 0x0201, &igot); get0 = igot;
+ switch (get0) {
+ case 0x04:
+ case 0x01:
+ return 0;
+ case 0x00:
+ msleep(20);
+ continue;
+ default:
+ return get0 - 1;
+ }
+ }
+ return -1;
+}
/****************************************************************************/
int confirm_resolution(struct usb_device *p)
@@ -935,36 +964,6 @@ int stop_100(struct usb_device *p)
return 0;
}
/****************************************************************************/
-/*--------------------------------------------------------------------------*/
-/*
- * FUNCTION wait_i2c() RETURNS 0 ON SUCCESS
-*/
-/*--------------------------------------------------------------------------*/
-int wait_i2c(struct usb_device *p)
-{
- u16 get0;
- u8 igot;
- const int max = 2;
- int k;
-
- if (!p)
- return -ENODEV;
-
- for (k = 0; k < max; k++) {
- GET(p, 0x0201, &igot); get0 = igot;
- switch (get0) {
- case 0x04:
- case 0x01:
- return 0;
- case 0x00:
- msleep(20);
- continue;
- default:
- return get0 - 1;
- }
- }
- return -1;
-}
/****************************************************************************/
/*****************************************************************************/
int wakeup_device(struct usb_device *pusb_device)