diff options
author | Greg KH <greg@press.(none)> | 2005-10-28 12:44:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:44:02 -0700 |
commit | 8944c7fdda25caf11b113ad95684381c0c991d95 (patch) | |
tree | 854823968bbb5a7c95dbab4cdc76b84cc9ec59bd /i2c | |
parent | 9d92996b5a38293545caf089cb2b7ecc1d6ecf3b (diff) | |
download | patches-8944c7fdda25caf11b113ad95684381c0c991d95.tar.gz |
i2c stuff
Diffstat (limited to 'i2c')
-rw-r--r-- | i2c/i2c-devfs-remove.patch | 63 | ||||
-rw-r--r-- | i2c/i2c-device-id-lm75.patch | 34 | ||||
-rw-r--r-- | i2c/i2c-device-id.patch | 30 |
3 files changed, 99 insertions, 28 deletions
diff --git a/i2c/i2c-devfs-remove.patch b/i2c/i2c-devfs-remove.patch new file mode 100644 index 0000000000000..22c22fa1dc4e1 --- /dev/null +++ b/i2c/i2c-devfs-remove.patch @@ -0,0 +1,63 @@ +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: I2C: remove devfs support from i2c-dev driver + +as devfs is gone, this isn't needed anymore. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/i2c/i2c-dev.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- gregkh-2.6.orig/drivers/i2c/i2c-dev.c ++++ gregkh-2.6/drivers/i2c/i2c-dev.c +@@ -26,15 +26,11 @@ + + /* The I2C_RDWR ioctl code is written by Kolja Waschk <waschk@telos.de> */ + +-/* The devfs code is contributed by Philipp Matthias Hahn +- <pmhahn@titan.lahn.de> */ +- + #include <linux/kernel.h> + #include <linux/module.h> + #include <linux/fs.h> + #include <linux/slab.h> + #include <linux/smp_lock.h> +-#include <linux/devfs_fs_kernel.h> + #include <linux/init.h> + #include <linux/i2c.h> + #include <linux/i2c-dev.h> +@@ -431,8 +427,6 @@ static int i2cdev_attach_adapter(struct + if (IS_ERR(i2c_dev)) + return PTR_ERR(i2c_dev); + +- devfs_mk_cdev(MKDEV(I2C_MAJOR, i2c_dev->minor), +- S_IFCHR|S_IRUSR|S_IWUSR, "i2c/%d", i2c_dev->minor); + pr_debug("i2c-dev: adapter [%s] registered as minor %d\n", + adap->name, i2c_dev->minor); + +@@ -465,7 +459,6 @@ static int i2cdev_detach_adapter(struct + return -ENODEV; + + init_completion(&i2c_dev->released); +- devfs_remove("i2c/%d", i2c_dev->minor); + return_i2c_dev(i2c_dev); + class_device_unregister(&i2c_dev->class_dev); + wait_for_completion(&i2c_dev->released); +@@ -521,8 +514,6 @@ static int __init i2c_dev_init(void) + if (res) + goto out_unreg_class; + +- devfs_mk_dir("i2c"); +- + return 0; + + out_unreg_class: +@@ -538,7 +529,6 @@ static void __exit i2c_dev_exit(void) + { + i2c_del_driver(&i2cdev_driver); + class_unregister(&i2c_dev_class); +- devfs_remove("i2c"); + unregister_chrdev(I2C_MAJOR,"i2c"); + } + diff --git a/i2c/i2c-device-id-lm75.patch b/i2c/i2c-device-id-lm75.patch new file mode 100644 index 0000000000000..29a74a0fd07a0 --- /dev/null +++ b/i2c/i2c-device-id-lm75.patch @@ -0,0 +1,34 @@ +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: I2C: add module alias to lm75 driver + +This is still only a test, and not ready for inclusion. + + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/hwmon/lm75.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- gregkh-2.6.orig/drivers/hwmon/lm75.c ++++ gregkh-2.6/drivers/hwmon/lm75.c +@@ -32,6 +32,19 @@ + static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; + ++static struct i2c_device_id id[] = { ++ { 0x48 }, ++ { 0x49 }, ++ { 0x4a }, ++ { 0x4b }, ++ { 0x4c }, ++ { 0x4d }, ++ { 0x4e }, ++ { 0x4f }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(i2c, id); ++ + /* Insmod parameters */ + I2C_CLIENT_INSMOD_1(lm75); + diff --git a/i2c/i2c-device-id.patch b/i2c/i2c-device-id.patch index c5b66adf3992b..9914cabb3f84b 100644 --- a/i2c/i2c-device-id.patch +++ b/i2c/i2c-device-id.patch @@ -1,42 +1,16 @@ From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: I2C: try to make I2C devices have proper modaliases +Subject: I2C: add i2c module alias for i2c drivers to use This is the start of adding hotplug-like support for i2c devices. -This is still only a test, and not ready for inclusion. - - Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- - drivers/hwmon/lm75.c | 13 +++++++++++++ include/linux/i2c.h | 1 + include/linux/mod_devicetable.h | 5 +++++ scripts/mod/file2alias.c | 10 ++++++++++ - 4 files changed, 29 insertions(+) + 3 files changed, 16 insertions(+) ---- gregkh-2.6.orig/drivers/hwmon/lm75.c -+++ gregkh-2.6/drivers/hwmon/lm75.c -@@ -32,6 +32,19 @@ - static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, - 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; - -+static struct i2c_device_id id[] = { -+ { 0x48 }, -+ { 0x49 }, -+ { 0x4a }, -+ { 0x4b }, -+ { 0x4c }, -+ { 0x4d }, -+ { 0x4e }, -+ { 0x4f }, -+ { }, -+}; -+MODULE_DEVICE_TABLE(i2c, id); -+ - /* Insmod parameters */ - I2C_CLIENT_INSMOD_1(lm75); - --- gregkh-2.6.orig/include/linux/mod_devicetable.h +++ gregkh-2.6/include/linux/mod_devicetable.h @@ -244,4 +244,9 @@ struct pcmcia_device_id { |