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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
420818f975
commit
c60adf37eb
@@ -373,6 +373,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;
|
||||||
|
Reference in New Issue
Block a user