aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-05-18 14:49:40 -0400
committerJean Delvare <khali@hyperion.delvare>2008-05-18 14:49:40 -0400
commit238a871e41ffbd9ba6608cac7c8b74549ac3bb9b (patch)
tree8a9d223126e2be1e4e922c2b99e3708da5ffa39f
parent24fbacca029ef1ecf007dc804c8f2c2285b6ceb3 (diff)
i2c: Switch pasemi to the new device/driver matching scheme
The old device/driver matching scheme is going away so stop using it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/powerpc/platforms/pasemi/misc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pasemi/misc.c b/arch/powerpc/platforms/pasemi/misc.c
index ded7d152d00c..e0ab299763c1 100644
--- a/arch/powerpc/platforms/pasemi/misc.c
+++ b/arch/powerpc/platforms/pasemi/misc.c
@@ -24,12 +24,11 @@
24 */ 24 */
25struct i2c_driver_device { 25struct i2c_driver_device {
26 char *of_device; 26 char *of_device;
27 char *i2c_driver;
28 char *i2c_type; 27 char *i2c_type;
29}; 28};
30 29
31static struct i2c_driver_device i2c_devices[] __initdata = { 30static struct i2c_driver_device i2c_devices[] __initdata = {
32 {"dallas,ds1338", "rtc-ds1307", "ds1338"}, 31 {"dallas,ds1338", "ds1338"},
33}; 32};
34 33
35static int __init find_i2c_driver(struct device_node *node, 34static int __init find_i2c_driver(struct device_node *node,
@@ -40,9 +39,7 @@ static int __init find_i2c_driver(struct device_node *node,
40 for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { 39 for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
41 if (!of_device_is_compatible(node, i2c_devices[i].of_device)) 40 if (!of_device_is_compatible(node, i2c_devices[i].of_device))
42 continue; 41 continue;
43 if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver, 42 if (strlcpy(info->type, i2c_devices[i].i2c_type,
44 KOBJ_NAME_LEN) >= KOBJ_NAME_LEN ||
45 strlcpy(info->type, i2c_devices[i].i2c_type,
46 I2C_NAME_SIZE) >= I2C_NAME_SIZE) 43 I2C_NAME_SIZE) >= I2C_NAME_SIZE)
47 return -ENOMEM; 44 return -ENOMEM;
48 return 0; 45 return 0;