Bug in usermode i2c-dev.h

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

 



Hi,

There is a discrepancy between the i2c_msg structure from the kernel i2c.h:

struct i2c_msg {
   __u16 addr; /* slave address        */
   __u16 flags;
   __u16 len;     /* msg length           */
   __u8 *buf;     /* pointer to msg data        */
};

and the lm_sensors-2.9.2 usermode i2c-dev.h version of i2c_msg:

struct i2c_msg {
        __u16 addr;     /* slave address                        */
        unsigned short flags;
        short len;              /* msg length                           */
        char *buf;              /* pointer to msg data                  */
        int err;
        short done;
};

The err and done members don't actually exist in the kernel version (I
checked 2.6.11 and 2.6.15).

This causes the 2nd and subsequent messages to not lineup when you use
the I2C_RDWR ioctl.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux