summaryrefslogtreecommitdiff
path: root/drivers/staging/dream
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2009-09-18 12:59:22 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:10 -0800
commit05d42522017df477f16c0ebc2d65aa8bde6e0e86 (patch)
tree85d00931ef92acefa04044f407d4aef49adf94a5 /drivers/staging/dream
parentb7fa31849c237b0bbcc03cd65536f0060ee6117d (diff)
Staging: dream: Synaptics touchscreen for HTC Dream: check that smbus is available
Check that SMBUS APIs are available in touchscreen driver. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Trilok Soni <soni.trilok@gmail.com> Cc: <arve@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/dream')
-rw-r--r--drivers/staging/dream/synaptics_i2c_rmi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
index ae696d3bc8e6..4de6bc917595 100644
--- a/drivers/staging/dream/synaptics_i2c_rmi.c
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -379,6 +379,12 @@ static int __devinit synaptics_ts_probe(
goto err_check_functionality_failed;
}
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
+ pr_err("synaptics_ts_probe: need I2C_FUNC_SMBUS_WORD_DATA\n");
+ ret = -ENODEV;
+ goto err_check_functionality_failed;
+ }
+
ts = kzalloc(sizeof(*ts), GFP_KERNEL);
if (ts == NULL) {
ret = -ENOMEM;