Input: wm97xx - remove redundant define
authorWolfram Sang <w.sang@pengutronix.de>
Tue, 5 Jul 2011 02:22:00 +0000 (19:22 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 5 Jul 2011 02:31:28 +0000 (19:31 -0700)
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/atmel-wm97xx.c
drivers/input/touchscreen/mainstone-wm97xx.c
drivers/input/touchscreen/wm9713.c
drivers/input/touchscreen/zylonite-wm97xx.c
include/linux/wm97xx.h

index c804189ccc3bd5dd44ea15cff1a983f0bfd72470..8034cbb20f74c8d8bcd426aa27b998e8bd8fcf20 100644 (file)
@@ -164,7 +164,7 @@ static irqreturn_t atmel_wm97xx_channel_b_interrupt(int irq, void *dev_id)
 
                data = ac97c_readl(atmel_wm97xx, CBRHR);
                value = data & 0x0fff;
-               source = data & WM97XX_ADCSRC_MASK;
+               source = data & WM97XX_ADCSEL_MASK;
                pen_down = (data & WM97XX_PEN_DOWN) >> 8;
 
                if (source == WM97XX_ADCSEL_X)
index 3242e7076258ebed157c3a3219fb559dee9b34dd..e966c29ff1bb1f81e035eaeb8a5a4144828119aa 100644 (file)
@@ -157,9 +157,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm)
                        x, y, p);
 
                /* are samples valid */
-               if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X ||
-                   (y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y ||
-                   (p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES)
+               if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X ||
+                   (y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y ||
+                   (p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES)
                        goto up;
 
                /* coordinate is good */
index 73ec99568f1285dd8176428e512e6042b83e7f9f..13cd9d1fa07a2dadef5a7563e731611c558838b0 100644 (file)
@@ -304,9 +304,9 @@ static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
                wm->mach_ops->post_sample(adcsel);
 
        /* check we have correct sample */
-       if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) {
+       if ((*sample & WM97XX_ADCSEL_MASK) != ffs(adcsel >> 1) << 12) {
                dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
-                       *sample & WM97XX_ADCSRC_MASK);
+                       *sample & WM97XX_ADCSEL_MASK);
                return RC_PENUP;
        }
 
index 5b0f15ec874a9d97798d686b8a3bac3ac00be9f6..f6328c0cded625f10eb7ef0b1418a331fb5df175 100644 (file)
@@ -122,9 +122,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm)
                        x, y, p);
 
                /* are samples valid */
-               if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X ||
-                   (y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y ||
-                   (p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES)
+               if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X ||
+                   (y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y ||
+                   (p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES)
                        goto up;
 
                /* coordinate is good */
index 38e8c4d9289e6a3aff5eb5fb975e1b4cd29597db..10b9e614fccdd69dbbbe685e9aaeae9bc9a1a16b 100644 (file)
@@ -38,7 +38,7 @@
 #define WM97XX_ADCSEL_X                0x1000  /* x coord measurement */
 #define WM97XX_ADCSEL_Y                0x2000  /* y coord measurement */
 #define WM97XX_ADCSEL_PRES     0x3000  /* pressure measurement */
-#define WM97XX_ADCSEL_MASK     0x7000
+#define WM97XX_ADCSEL_MASK     0x7000  /* ADC selection mask */
 #define WM97XX_COO             0x0800  /* enable coordinate mode */
 #define WM97XX_CTC             0x0400  /* enable continuous mode */
 #define WM97XX_CM_RATE_93      0x0000  /* 93.75Hz continuous rate */
@@ -61,7 +61,6 @@
 #define WM97XX_PRP_DET_DIG     0xc000  /* setect on, digitise on */
 #define WM97XX_RPR             0x2000  /* wake up on pen down */
 #define WM97XX_PEN_DOWN                0x8000  /* pen is down */
-#define WM97XX_ADCSRC_MASK     0x7000  /* ADC source mask */
 
 #define WM97XX_AUX_ID1         0x8001
 #define WM97XX_AUX_ID2         0x8002