From: Kwangwoo Lee Date: Sat, 16 May 2009 02:14:35 +0000 (-0700) Subject: Input: tsc2007 - make sure platform provides get_pendown_state() X-Git-Tag: firefly_0821_release~12966^2~42 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=78f7f36711396991431a1d7ceab6103d2c54694c;p=firefly-linux-kernel-4.4.55.git Input: tsc2007 - make sure platform provides get_pendown_state() The platform codes must provide get_pendown_state() for the driver to work properly. Signed-off-by: Kwangwoo Lee Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 536668fbda22..edd4f64d1f43 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -256,7 +256,7 @@ static int tsc2007_probe(struct i2c_client *client, struct input_dev *input_dev; int err; - if (!pdata) { + if (!pdata || !pdata->get_pendown_state) { dev_err(&client->dev, "platform data is required!\n"); return -EINVAL; }