aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch
diff options
context:
space:
mode:
authorClaudio Mignanti <c.mignanti@gmail.com>2010-02-07 12:38:25 +0000
committerClaudio Mignanti <c.mignanti@gmail.com>2010-02-07 12:38:25 +0000
commit222e7933e9e439bfac671b2c62efa33825a1f1ab (patch)
tree082493febb7247efeb1afbe9de928c11874eb2ea /target/linux/etrax/patches-2.6.32/620-create-the-i2c-devices.patch
parent61e3a578d776d4e14aeda83de738d50d90c236df (diff)
downloadupstream-222e7933e9e439bfac671b2c62efa33825a1f1ab.tar.gz
upstream-222e7933e9e439bfac671b2c62efa33825a1f1ab.tar.bz2
upstream-222e7933e9e439bfac671b2c62efa33825a1f1ab.zip
etrax: 2.6.32 support
SVN-Revision: 19543
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.patch32
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;
+ }
+