evdev: Release eventual input device grabs when getting disconnected
[sfrench/cifs-2.6.git] / drivers / input / mouse / trackpoint.h
index 9857d8b6ad66520fe71d0e7b0ed8476cd0417479..c10a6e7d01011bdfa6bbceb16fcf0cddb72dc3ce 100644 (file)
@@ -78,7 +78,7 @@
 
 #define TP_TOGGLE_MB           0x23    /* Disable/Enable Middle Button */
 #define TP_MASK_MB                     0x01
-#define TP_TOGGLE_EXT_DEV      0x23    /* Toggle external device */
+#define TP_TOGGLE_EXT_DEV      0x23    /* Disable external device */
 #define TP_MASK_EXT_DEV                        0x02
 #define TP_TOGGLE_DRIFT                0x23    /* Drift Correction */
 #define TP_MASK_DRIFT                  0x80
 #define TP_DEF_MB              0x00
 #define TP_DEF_PTSON           0x00
 #define TP_DEF_SKIPBACK                0x00
-#define TP_DEF_EXT_DEV         0x01
+#define TP_DEF_EXT_DEV         0x00    /* 0 means enabled */
 
 #define MAKE_PS2_CMD(params, results, cmd) ((params<<12) | (results<<8) | (cmd))
 
@@ -142,6 +142,13 @@ struct trackpoint_data
        unsigned char ext_dev;
 };
 
-extern int trackpoint_detect(struct psmouse *psmouse, int set_properties);
+#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
+int trackpoint_detect(struct psmouse *psmouse, int set_properties);
+#else
+inline int trackpoint_detect(struct psmouse *psmouse, int set_properties)
+{
+       return -ENOSYS;
+}
+#endif /* CONFIG_MOUSE_PS2_TRACKPOINT */
 
 #endif /* _TRACKPOINT_H */