]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Let the user specify PCI driver data through new_id
authorJean Delvare <khali@linux-fr.org>
Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)
committerJean Delvare <khali@hyperion.delvare>
Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)
commit7335588f0c7a1c4aa3b82c4cea89dd5077119d86
tree0ff3b88a1435a37480e9203dcca91482fb1dba3c
parent907aadb430e97d0a46389e488ec772901c08aaf0
i2c: Let the user specify PCI driver data through new_id

The i2c-amd756 and i2c-viapro drivers make use of the driver_data
field of the PCI device ID. When adding device IDs dynamically (by
writing to the new_id sysfs file) you cannot set the value of this
field by default. It has to be allowed explicitly. Do that, and
check the value so that the user can't crash the kernel accidentally.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-viapro.c