diff options
author | Pavel Machek <pavel@ucw.cz> | 2009-08-08 13:40:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 19:02:05 (GMT) |
commit | c60adf37eb9cbb244025a0d02ba41bc7931bc674 (patch) | |
tree | 6bc16bf8f6ed936c890930c30f34afb4193a718c /drivers | |
parent | 420818f9755a5676db7c392ba6f77d795f13675b (diff) | |
download | linux-fsl-qoriq-c60adf37eb9cbb244025a0d02ba41bc7931bc674.tar.xz |
Staging: dream: Synaptics touchscreen: check that smbus is available
Check that SMBUS APIs are available in touchscreen driver.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/dream/synaptics_i2c_rmi.c | 6 |
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 9190a9d..ae696d3 100644 --- a/drivers/staging/dream/synaptics_i2c_rmi.c +++ b/drivers/staging/dream/synaptics_i2c_rmi.c @@ -373,6 +373,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; |