diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 10:06:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 10:06:29 -0700 |
commit | 1c00650c233c404fadf9347329214d55283bd17a (patch) | |
tree | 9de7cda2fe2e54411cc24ff3befd758c9cb9cd74 /drivers/media/video/cx88/cx88-i2c.c | |
parent | 26df0766a73a859bb93dc58e747c5028557a23fd (diff) | |
parent | 7f528135da9704d67db1f727162024b078e1cd8f (diff) |
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c: I2C bus multiplexer driver pca954x
i2c: Multiplexed I2C bus core support
i2c: Use a separate mutex for userspace client lists
i2c: Make i2c_default_probe self-sufficient
i2c: Drop dummy variable
i2c: Move adapter locking helpers to i2c-core
V4L/DVB: Use custom I2C probing function mechanism
i2c: Add support for custom probe function
i2c-dev: Use memdup_user
i2c-dev: Remove unnecessary kmalloc casts
Diffstat (limited to 'drivers/media/video/cx88/cx88-i2c.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 375ad53f796..82db555b22d 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c @@ -193,24 +193,13 @@ void cx88_i2c_init_ir(struct cx88_core *core) 0x18, 0x6b, 0x71, I2C_CLIENT_END }; - const unsigned short *addrp; memset(&info, 0, sizeof(struct i2c_board_info)); strlcpy(info.type, "ir_video", I2C_NAME_SIZE); - /* - * We can't call i2c_new_probed_device() because it uses - * quick writes for probing and at least some R receiver - * devices only reply to reads. - */ - for (addrp = addr_list; *addrp != I2C_CLIENT_END; addrp++) { - if (i2c_smbus_xfer(&core->i2c_adap, *addrp, 0, - I2C_SMBUS_READ, 0, - I2C_SMBUS_QUICK, NULL) >= 0) { - info.addr = *addrp; - i2c_new_device(&core->i2c_adap, &info); - break; - } - } + /* Use quick read command for probe, some IR chips don't + * support writes */ + i2c_new_probed_device(&core->i2c_adap, &info, addr_list, + i2c_probe_func_quick_read); } } |