[staging-next 1/6] staging/easycap: wait_i2c should be static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wait_i2c is only used from easycap_low.c
so remove it from the easycap.h and mark it static

Cc: Mike Thomas <rmthomas@xxxxxxxxxxx>
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
---
 drivers/staging/easycap/easycap.h     |    1 -
 drivers/staging/easycap/easycap_low.c |   61 ++++++++++++++++-----------------
 2 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/easycap/easycap.h b/drivers/staging/easycap/easycap.h
index e8ef1a2..a80d023 100644
--- a/drivers/staging/easycap/easycap.h
+++ b/drivers/staging/easycap/easycap.h
@@ -558,7 +558,6 @@ int              set_resolution(struct usb_device *,
 int              read_saa(struct usb_device *, u16);
 int              read_stk(struct usb_device *, u32);
 int              write_saa(struct usb_device *, u16, u16);
-int              wait_i2c(struct usb_device *);
 int              write_000(struct usb_device *, u16, u16);
 int              start_100(struct usb_device *);
 int              stop_100(struct usb_device *);
diff --git a/drivers/staging/easycap/easycap_low.c b/drivers/staging/easycap/easycap_low.c
index 403415e..8e4e11f 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)
-- 
1.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux