Skip to content

Commit 238a871

Browse files
Jean DelvareJean Delvare
authored andcommitted
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>
1 parent 24fbacc commit 238a871

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • arch/powerpc/platforms/pasemi

‎arch/powerpc/platforms/pasemi/misc.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
*/
2525
struct i2c_driver_device {
2626
char *of_device;
27-
char *i2c_driver;
2827
char *i2c_type;
2928
};
3029

3130
static struct i2c_driver_device i2c_devices[] __initdata = {
32-
{"dallas,ds1338", "rtc-ds1307", "ds1338"},
31+
{"dallas,ds1338", "ds1338"},
3332
};
3433

3534
static int __init find_i2c_driver(struct device_node *node,
@@ -40,9 +39,7 @@ static int __init find_i2c_driver(struct device_node *node,
4039
for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
4140
if (!of_device_is_compatible(node, i2c_devices[i].of_device))
4241
continue;
43-
if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver,
44-
KOBJ_NAME_LEN) >= KOBJ_NAME_LEN ||
45-
strlcpy(info->type, i2c_devices[i].i2c_type,
42+
if (strlcpy(info->type, i2c_devices[i].i2c_type,
4643
I2C_NAME_SIZE) >= I2C_NAME_SIZE)
4744
return -ENOMEM;
4845
return 0;

0 commit comments

Comments
 (0)