summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini@gnudd.com>2011-05-26 12:44:52 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:06:08 +0200
commit9d5b9cd273d72e40bbe843bf360db4013575675e (patch)
tree0cd5b876f7d7780b7a28270a2aaf43d0563d4c7c
parentdce99f8d1a5dcd1bd1ccdee10ead754406a880ae (diff)
input/misc: fix lps001wp_prs.c so it will compile (next commit)
This fixes some undefined SHORT_MAX and so on. I use explicit hex because it is not short, it's exactly 16 bits. Moreover, it adds some needed headers and removes some unused ones. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Change-Id: I1029884822ba869fc14c34793a50f61e5f4889b2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24796 Tested-by: Robert MARKLUND <robert.marklund@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
-rw-r--r--drivers/input/misc/lps001wp_prs.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/input/misc/lps001wp_prs.c b/drivers/input/misc/lps001wp_prs.c
index 6157c474bb4..9ec96ba3863 100644
--- a/drivers/input/misc/lps001wp_prs.c
+++ b/drivers/input/misc/lps001wp_prs.c
@@ -35,19 +35,16 @@
moved to input/misc
******************************************************************************/
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/init.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/delay.h>
-#include <linux/fs.h>
#include <linux/i2c.h>
-
#include <linux/input.h>
-#include <linux/uaccess.h>
-
#include <linux/workqueue.h>
-#include <linux/irq.h>
-#include <linux/gpio.h>
-#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/input/lps001wp.h>
@@ -57,13 +54,12 @@
#define DEBUG 1
-#define PR_ABS_MAX USHORT_MAX
-
-#define PR_ABS_MIN (u16)(0U)
-#define PR_DLT_MAX SHORT_MAX
-#define PR_DLT_MIN SHORT_MIN
-#define TEMP_MAX SHORT_MAX
-#define TEMP_MIN SHORT_MIN
+#define PR_ABS_MAX 0xffff
+#define PR_ABS_MIN 0x0000
+#define PR_DLT_MAX 0x7ffff
+#define PR_DLT_MIN -0x80000 /* 16-bit signed value */
+#define TEMP_MAX 0x7fff
+#define TEMP_MIN -0x80000 /* 16-bit signed value */
#define SENSITIVITY_T_SHIFT 6 /** = 64 LSB/degrC */