Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c: chips subdirectory is deprecated
i2c: Keep client->driver and client->dev.driver in sync
i2c-amd756: Fix off-by-one

+13 -2
+1 -1
drivers/i2c/busses/i2c-amd756.c
··· 335 335 u8 temp; 336 336 337 337 /* driver_data might come from user-space, so check it */ 338 - if (id->driver_data > ARRAY_SIZE(chipname)) 338 + if (id->driver_data >= ARRAY_SIZE(chipname)) 339 339 return -EINVAL; 340 340 341 341 if (amd756_ioport) {
+7
drivers/i2c/chips/Makefile
··· 1 1 # 2 2 # Makefile for miscellaneous I2C chip drivers. 3 3 # 4 + # Think twice before you add a new driver to this directory. 5 + # Device drivers are better grouped according to the functionality they 6 + # implement rather than to the bus they are connected to. In particular: 7 + # * Hardware monitoring chip drivers go to drivers/hwmon 8 + # * RTC chip drivers go to drivers/rtc 9 + # * I/O expander drivers go to drivers/gpio 10 + # 4 11 5 12 obj-$(CONFIG_DS1682) += ds1682.o 6 13 obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o
+5 -1
drivers/i2c/i2c-core.c
··· 90 90 { 91 91 struct i2c_client *client = to_i2c_client(dev); 92 92 struct i2c_driver *driver = to_i2c_driver(dev->driver); 93 + int status; 93 94 94 95 if (!driver->probe) 95 96 return -ENODEV; 96 97 client->driver = driver; 97 98 dev_dbg(dev, "probe\n"); 98 - return driver->probe(client); 99 + status = driver->probe(client); 100 + if (status) 101 + client->driver = NULL; 102 + return status; 99 103 } 100 104 101 105 static int i2c_device_remove(struct device *dev)