]> err.no Git - linux-2.6/blobdiff - drivers/sbus/char/vfc_i2c.c
drivers/sbus/: cleanups
[linux-2.6] / drivers / sbus / char / vfc_i2c.c
index 739cad9b19a1f55a98d9c4be5a5d3a08cf43a026..32b986e0ed786c1379d3a83dbefca980693f3f9f 100644 (file)
@@ -14,7 +14,7 @@
 /* NOTE: It seems to me that the documentation regarding the
 pcd8584t/pcf8584 does not show the correct way to address the i2c bus.
 Based on the information on the I2C bus itself and the remainder of
-the Phillips docs the following algorithims apper to be correct.  I am
+the Phillips docs the following algorithms appear to be correct.  I am
 fairly certain that the flowcharts in the phillips docs are wrong. */
 
 
@@ -81,8 +81,7 @@ int vfc_pcf8584_init(struct vfc_dev *dev)
 
 void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs) 
 {
-       set_current_state(TASK_UNINTERRUPTIBLE);
-       schedule_timeout(usecs_to_jiffies(usecs));
+       schedule_timeout_uninterruptible(usecs_to_jiffies(usecs));
 }
 
 void inline vfc_i2c_delay(struct vfc_dev *dev) 
@@ -115,7 +114,7 @@ int vfc_i2c_reset_bus(struct vfc_dev *dev)
        return 0;
 }
 
-int vfc_i2c_wait_for_bus(struct vfc_dev *dev) 
+static int vfc_i2c_wait_for_bus(struct vfc_dev *dev)
 {
        int timeout = 1000; 
 
@@ -127,7 +126,7 @@ int vfc_i2c_wait_for_bus(struct vfc_dev *dev)
        return 0;
 }
 
-int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack)
+static int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack)
 {
        int timeout = 1000; 
        int s1;
@@ -145,7 +144,8 @@ int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack)
 }
 
 #define SHIFT(a) ((a) << 24)
-int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr, char mode) 
+static int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr,
+                            char mode)
 { 
        int ret, raddr;
 #if 1
@@ -196,7 +196,7 @@ int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr, char mode)
        return 0;
 }
 
-int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte) 
+static int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte)
 {
        int ret;
        u32 val = SHIFT((unsigned int)*byte);
@@ -219,7 +219,8 @@ int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte)
        return ret;
 }
 
-int vfc_i2c_recv_byte(struct vfc_dev *dev, unsigned char *byte, int last) 
+static int vfc_i2c_recv_byte(struct vfc_dev *dev, unsigned char *byte,
+                            int last)
 {
        int ret;