diff options
author | claudio <claudio@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-02-07 12:38:25 +0000 |
---|---|---|
committer | claudio <claudio@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-02-07 12:38:25 +0000 |
commit | 18a1d11eb0b09fc5adfd3b051ca7181d255ec07a (patch) | |
tree | f5152aa5a19fb09ce97af1a641bfbb4a251ed816 /target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch | |
parent | 0eaf78eb55c685c61c5cd2d1c0c13928889ac794 (diff) |
etrax: 2.6.32 support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19543 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch')
-rw-r--r-- | target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch b/target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch new file mode 100644 index 0000000000..9c2e37ae98 --- /dev/null +++ b/target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch @@ -0,0 +1,32 @@ +--- a/arch/cris/arch-v10/drivers/i2c.c ++++ b/arch/cris/arch-v10/drivers/i2c.c +@@ -21,6 +21,7 @@ + #include <linux/fs.h> + #include <linux/string.h> + #include <linux/init.h> ++#include <linux/device.h> + + #include <asm/etraxi2c.h> + +@@ -678,6 +679,8 @@ i2c_init(void) + return res; + } + ++static struct class *i2c_class; ++ + static int __init + i2c_register(void) + { +@@ -693,7 +696,11 @@ i2c_register(void) + } + + printk(KERN_INFO "I2C driver v2.2, (c) 1999-2004 Axis Communications AB\n"); +- ++ ++ i2c_class = class_create(THIS_MODULE, "i2c_etrax"); ++ device_create(i2c_class, NULL, ++ MKDEV(I2C_MAJOR, 0), NULL, "i2c"); ++ + return 0; + } + |