Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Prevent log spam on some DVB adapters
i2c: Add missing kerneldoc descriptions
i2c: Fix device_init_wakeup place

+22 -8
+10 -8
drivers/i2c/i2c-core.c
··· 108 108 if (!driver->probe || !driver->id_table) 109 109 return -ENODEV; 110 110 client->driver = driver; 111 + if (!device_can_wakeup(&client->dev)) 112 + device_init_wakeup(&client->dev, 113 + client->flags & I2C_CLIENT_WAKE); 111 114 dev_dbg(dev, "probe\n"); 112 115 113 116 status = driver->probe(client, i2c_match_id(driver->id_table, client)); ··· 265 262 client->adapter = adap; 266 263 267 264 client->dev.platform_data = info->platform_data; 268 - device_init_wakeup(&client->dev, info->flags & I2C_CLIENT_WAKE); 269 265 270 - client->flags = info->flags & ~I2C_CLIENT_WAKE; 266 + client->flags = info->flags; 271 267 client->addr = info->addr; 272 268 client->irq = info->irq; 273 269 ··· 1190 1188 && address_data->normal_i2c[0] == I2C_CLIENT_END) 1191 1189 return 0; 1192 1190 1193 - dev_warn(&adapter->dev, "SMBus Quick command not supported, " 1194 - "can't probe for chips\n"); 1191 + dev_dbg(&adapter->dev, "SMBus Quick command not supported, " 1192 + "can't probe for chips\n"); 1195 1193 return -EOPNOTSUPP; 1196 1194 } 1197 1195 ··· 1352 1350 } 1353 1351 } 1354 1352 1353 + /* Stop here if the classes do not match */ 1354 + if (!(adapter->class & driver->class)) 1355 + goto exit_free; 1356 + 1355 1357 /* Stop here if we can't use SMBUS_QUICK */ 1356 1358 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { 1357 1359 if (address_data->probe[0] == I2C_CLIENT_END ··· 1367 1361 err = -EOPNOTSUPP; 1368 1362 goto exit_free; 1369 1363 } 1370 - 1371 - /* Stop here if the classes do not match */ 1372 - if (!(adapter->class & driver->class)) 1373 - goto exit_free; 1374 1364 1375 1365 /* Probe entries are done second, and are not affected by ignore 1376 1366 entries either */
+12
include/linux/i2c.h
··· 97 97 98 98 /** 99 99 * struct i2c_driver - represent an I2C device driver 100 + * @id: Unique driver ID (optional) 100 101 * @class: What kind of i2c device we instantiate (for detect) 102 + * @attach_adapter: Callback for bus addition (for legacy drivers) 103 + * @detach_adapter: Callback for bus removal (for legacy drivers) 104 + * @detach_client: Callback for device removal (for legacy drivers) 105 + * @probe: Callback for device binding (new-style drivers) 106 + * @remove: Callback for device unbinding (new-style drivers) 107 + * @shutdown: Callback for device shutdown 108 + * @suspend: Callback for device suspend 109 + * @resume: Callback for device resume 110 + * @command: Callback for bus-wide signaling (optional) 111 + * @driver: Device driver model driver 112 + * @id_table: List of I2C devices supported by this driver 101 113 * @detect: Callback for device detection 102 114 * @address_data: The I2C addresses to probe, ignore or force (for detect) 103 115 * @clients: List of detected clients we created (for i2c-core use only)