From 8e6146bf5b779dd8c78df625549d1f92beaa23e7 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Sun, 6 Oct 2013 00:53:52 -0700 Subject: Input: ti_am335x_tsc - remove redundant of_match_ptr The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ti_am335x_tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/ti_am335x_tsc.c') diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index e1c5300cacfc..df9b24f7e2cb 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -505,7 +505,7 @@ static struct platform_driver ti_tsc_driver = { .name = "TI-am335x-tsc", .owner = THIS_MODULE, .pm = TITSC_PM_OPS, - .of_match_table = of_match_ptr(ti_tsc_dt_ids), + .of_match_table = ti_tsc_dt_ids, }, }; module_platform_driver(ti_tsc_driver); -- cgit v1.2.1 From c9aeb249bf72edcf1ca28fe301fb3cbb53cb23d8 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Sun, 10 Nov 2013 23:56:43 -0800 Subject: Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding There was a spelling mistake on TSC/ADC binding where "coordinate" was spelled as "coordiante". We can't simply fix the error due to DT being an ABI, the approach taken was to first use correct spelling and if that fails, fall back to miss-spelled version. It's unfortunate that has creeped into the tree. Signed-off-by: Felipe Balbi Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ti_am335x_tsc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/ti_am335x_tsc.c') diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index df9b24f7e2cb..ad7564296ddf 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -348,8 +348,15 @@ static int titsc_parse_dt(struct platform_device *pdev, if (err < 0) return err; - err = of_property_read_u32(node, "ti,coordiante-readouts", + /* + * Try with the new binding first. If it fails, try again with + * bogus, miss-spelled version. + */ + err = of_property_read_u32(node, "ti,coordinate-readouts", &ts_dev->coordinate_readouts); + if (err < 0) + err = of_property_read_u32(node, "ti,coordiante-readouts", + &ts_dev->coordinate_readouts); if (err < 0) return err; -- cgit v1.2.1