Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[pandora-kernel.git] / drivers / input / tsdev.c
index 5f9ecad..0300dca 100644 (file)
@@ -48,7 +48,6 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/major.h>
-#include <linux/config.h>
 #include <linux/smp_lock.h>
 #include <linux/random.h>
 #include <linux/time.h>
@@ -136,8 +135,6 @@ struct tsdev_list {
 #define TS_GET_CAL     _IOR(IOC_H3600_TS_MAGIC, 10, struct ts_calibration)
 #define TS_SET_CAL     _IOW(IOC_H3600_TS_MAGIC, 11, struct ts_calibration)
 
-static struct input_handler tsdev_handler;
-
 static struct tsdev *tsdev_table[TSDEV_MINORS/2];
 
 static int tsdev_fasync(int fd, struct file *file, int on)
@@ -154,6 +151,10 @@ static int tsdev_open(struct inode *inode, struct file *file)
        int i = iminor(inode) - TSDEV_MINOR_BASE;
        struct tsdev_list *list;
 
+       printk(KERN_WARNING "tsdev (compaq touchscreen emulation) is scheduled "
+               "for removal.\nSee Documentation/feature-removal-schedule.txt "
+               "for details.\n");
+
        if (i >= TSDEV_MINORS || !tsdev_table[i & TSDEV_MINOR_MASK])
                return -ENODEV;
 
@@ -264,7 +265,7 @@ static int tsdev_ioctl(struct inode *inode, struct file *file,
        return retval;
 }
 
-static struct file_operations tsdev_fops = {
+static const struct file_operations tsdev_fops = {
        .owner =        THIS_MODULE,
        .open =         tsdev_open,
        .release =      tsdev_release,
@@ -371,7 +372,7 @@ static void tsdev_event(struct input_handle *handle, unsigned int type,
 
 static struct input_handle *tsdev_connect(struct input_handler *handler,
                                          struct input_dev *dev,
-                                         struct input_device_id *id)
+                                         const struct input_device_id *id)
 {
        struct tsdev *tsdev;
        struct class_device *cdev;
@@ -444,7 +445,7 @@ static void tsdev_disconnect(struct input_handle *handle)
                tsdev_free(tsdev);
 }
 
-static struct input_device_id tsdev_ids[] = {
+static const struct input_device_id tsdev_ids[] = {
        {
              .flags    = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_RELBIT,
              .evbit    = { BIT(EV_KEY) | BIT(EV_REL) },
@@ -482,9 +483,7 @@ static struct input_handler tsdev_handler = {
 
 static int __init tsdev_init(void)
 {
-       input_register_handler(&tsdev_handler);
-       printk(KERN_INFO "ts: Compaq touchscreen protocol output\n");
-       return 0;
+       return input_register_handler(&tsdev_handler);
 }
 
 static void __exit tsdev_exit(void)