From c2f72540eaa86cc468ab745ed7da6f1210620bea Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Fri, 9 Jan 2004 15:29:57 +0000 Subject: [PATCH] - ugly, dropped; fixed in glibc-kernel-headers Changed files: DirectFB-broken-i2c-workaround.patch -> 1.3 --- DirectFB-broken-i2c-workaround.patch | 64 ---------------------------- 1 file changed, 64 deletions(-) delete mode 100644 DirectFB-broken-i2c-workaround.patch diff --git a/DirectFB-broken-i2c-workaround.patch b/DirectFB-broken-i2c-workaround.patch deleted file mode 100644 index 3897dac..0000000 --- a/DirectFB-broken-i2c-workaround.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- DirectFB-0.9.20/gfxdrivers/matrox/matrox_maven.c.orig 2003-07-08 14:44:19.000000000 +0000 -+++ DirectFB-0.9.20/gfxdrivers/matrox/matrox_maven.c 2003-11-12 15:16:53.000000000 +0000 -@@ -29,7 +29,61 @@ - #include - #include - #include -+/* i2c-dev.h is broken in i2c 2.8.[01] - must include first :/ -+ * but is included in , which is needed too -+ * ...and i2c.h is broken even (MUCH!) more, because it uses internal kernel types -+ * inside not #ifdef __KERNEL__-ed part!!! argh!!! */ -+#include - #include -+#ifndef I2C_SLAVE -+/* #include cannot be used with i2c 2.8.x - it's for internal -+ * kernel use; stuff below is copied from i2c.h and old i2c-dev.h */ -+#define I2C_SLAVE 0x0703 /* Change slave address */ -+ /* Attn.: Slave address is 7 or 10 bits */ -+/* -+ * Data for SMBus Messages -+ */ -+#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */ -+union i2c_smbus_data { -+ __u8 byte; -+ __u16 word; -+ __u8 block[I2C_SMBUS_BLOCK_MAX + 3]; /* block[0] is used for length */ -+ /* one more for read length in block process call */ -+ /* and one more for PEC */ -+}; -+#define I2C_SMBUS 0x0720 /* SMBus-level access */ -+static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command, -+ int size, union i2c_smbus_data *data) -+{ -+ struct i2c_smbus_ioctl_data args; -+ -+ args.read_write = read_write; -+ args.command = command; -+ args.size = size; -+ args.data = data; -+ return ioctl(file,I2C_SMBUS,&args); -+} -+/* smbus_access read or write markers */ -+#define I2C_SMBUS_WRITE 0 -+#define I2C_SMBUS_BYTE_DATA 2 -+#define I2C_SMBUS_WORD_DATA 3 -+static inline __s32 i2c_smbus_write_byte_data(int file, __u8 command, -+ __u8 value) -+{ -+ union i2c_smbus_data data; -+ data.byte = value; -+ return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, -+ I2C_SMBUS_BYTE_DATA, &data); -+} -+static inline __s32 i2c_smbus_write_word_data(int file, __u8 command, -+ __u16 value) -+{ -+ union i2c_smbus_data data; -+ data.word = value; -+ return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, -+ I2C_SMBUS_WORD_DATA, &data); -+} -+#endif - - #include - #include -- 2.44.0