aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ts_filter_linear.c
diff options
context:
space:
mode:
authorNelson Castillo <arhuaco@freaks-unidos.net>2009-03-10 12:04:16 +0000
committerAndy Green <agreen@octopus.localdomain>2009-03-10 12:04:16 +0000
commit9e58a18567ec1ef306ea7b973749e5cd9902702c (patch)
treedbb5cbc62e0d91c6b185faad5bf93acf6b2733a6 /drivers/input/touchscreen/ts_filter_linear.c
parentbd88fa696f505a8a71484341e4fcde581b2d12a6 (diff)
Use non-void configurations
This patch defines a ts_filter_configuration structure to avoid using void* in the filter initialization, fixing another upstream correction. This also makes the initialization more readable. Tested in GTA02/rev6. Other changes: ~ Comment filter configuration structures. ~ ts_filter.c:ts_filter_chain_create improved. ~ Small cleanups. ~ More TODOs/FIXMEs. ~ Updated GTA02 filter configuration. ~ Updated GTA01 filter configuration. ~ Updated mach-s3c2410/include/mach/ts.h for the new ts. configuration structure. ~ Updated all the filters to use the new configuration structure. ~ Removed MAX_TS_FILTER_CHAIN constant that is no longer needed. No more evil casts left it seems. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'drivers/input/touchscreen/ts_filter_linear.c')
-rw-r--r--drivers/input/touchscreen/ts_filter_linear.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/ts_filter_linear.c b/drivers/input/touchscreen/ts_filter_linear.c
index 72a362f7567..bb6381457a8 100644
--- a/drivers/input/touchscreen/ts_filter_linear.c
+++ b/drivers/input/touchscreen/ts_filter_linear.c
@@ -125,8 +125,10 @@ static ssize_t const_store(struct const_obj *obj, struct const_attribute *attr,
/* Filter functions. */
-static struct ts_filter *ts_filter_linear_create(struct platform_device *pdev,
- void *conf, int count_coords)
+static struct ts_filter *ts_filter_linear_create(
+ struct platform_device *pdev,
+ struct ts_filter_configuration *conf,
+ int count_coords)
{
struct ts_filter_linear *tsfl;
int i;
@@ -136,7 +138,10 @@ static struct ts_filter *ts_filter_linear_create(struct platform_device *pdev,
if (!tsfl)
return NULL;
- tsfl->config = (struct ts_filter_linear_configuration *)conf;
+ tsfl->config = container_of(conf,
+ struct ts_filter_linear_configuration,
+ config);
+
tsfl->tsf.count_coords = count_coords;
for (i = 0; i < TS_FILTER_LINEAR_NCONSTANTS; ++i) {