Commit 05d42522 authored by Pavel Machek's avatar Pavel Machek Committed by Greg Kroah-Hartman

Staging: dream: Synaptics touchscreen for HTC Dream: check that smbus is available

Check that SMBUS APIs are available in touchscreen driver.
Signed-off-by: default avatarPavel 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b7fa3184
...@@ -379,6 +379,12 @@ static int __devinit synaptics_ts_probe( ...@@ -379,6 +379,12 @@ static int __devinit synaptics_ts_probe(
goto err_check_functionality_failed; 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); ts = kzalloc(sizeof(*ts), GFP_KERNEL);
if (ts == NULL) { if (ts == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment