From d60b7ebbf6c115a485c862af62bf34cd33707b5c Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Thu, 21 Feb 2013 12:14:58 -0800 Subject: [PATCH] --- yaml --- r: 360569 b: refs/heads/master c: bcaf089c5160639d6c43091f717faa3d0dc8f3d8 h: refs/heads/master i: 360567: fe0a75c257ba23e73c46871a37562d500fafc618 v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/chromeos_laptop.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 005c8a917d29..628f4c0e02ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8e1ad4c4bf7b99b495625433a1fcc2b566caa222 +refs/heads/master: bcaf089c5160639d6c43091f717faa3d0dc8f3d8 diff --git a/trunk/drivers/platform/x86/chromeos_laptop.c b/trunk/drivers/platform/x86/chromeos_laptop.c index 577e64d9f0ac..c13f0c5e282a 100644 --- a/trunk/drivers/platform/x86/chromeos_laptop.c +++ b/trunk/drivers/platform/x86/chromeos_laptop.c @@ -147,6 +147,26 @@ static int __init find_i2c_adapter_num(enum i2c_adapter_type type) return adapter->nr; } +/* + * Takes a list of addresses in addrs as such : + * { addr1, ... , addrn, I2C_CLIENT_END }; + * add_probed_i2c_device will use i2c_new_probed_device + * and probe for devices at all of the addresses listed. + * Returns NULL if no devices found. + * See Documentation/i2c/instantiating-devices for more information. + */ +static __init struct i2c_client *add_probed_i2c_device( + const char *name, + enum i2c_adapter_type type, + struct i2c_board_info *info, + const unsigned short *addrs) +{ + return __add_probed_i2c_device(name, + find_i2c_adapter_num(type), + info, + addrs); +} + /* * Probes for a device at a single address, the one provided by * info->addr.