Skip to content

Commit

Permalink
Staging: dream: Synaptics touchscreen for HTC Dream: check that smbus…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Pavel Machek authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent b7fa318 commit 05d4252
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/staging/dream/synaptics_i2c_rmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05d4252

Please sign in to comment.