Input: remove unused defines
[safe/jmp/linux-2.6] / include / linux / input.h
index 9a963fe..eff711d 100644 (file)
@@ -371,6 +371,8 @@ struct input_absinfo {
 #define KEY_BRIGHTNESS_ZERO    244     /* brightness off, use ambient */
 #define KEY_DISPLAY_OFF                245     /* display device to off state */
 
+#define KEY_WIMAX              246
+
 #define BTN_MISC               0x100
 #define BTN_0                  0x100
 #define BTN_1                  0x101
@@ -1018,16 +1020,11 @@ struct ff_effect {
  * @going_away: marks devices that are in a middle of unregistering and
  *     causes input_open_device*() fail with -ENODEV.
  * @dev: driver model's view of this device
- * @cdev: union for struct device pointer
  * @h_list: list of input handles associated with the device. When
  *     accessing the list dev->mutex must be held
  * @node: used to place the device onto input_dev_list
  */
 struct input_dev {
-       /* private: */
-       void *private;  /* do not use */
-       /* public: */
-
        const char *name;
        const char *phys;
        const char *uniq;
@@ -1083,9 +1080,6 @@ struct input_dev {
        int going_away;
 
        struct device dev;
-       union {                 /* temporarily so while we switching to struct device */
-               struct device *dev;
-       } cdev;
 
        struct list_head        h_list;
        struct list_head        node;
@@ -1219,32 +1213,28 @@ struct input_handle {
        struct list_head        h_node;
 };
 
-#define to_dev(n) container_of(n, struct input_dev, node)
-#define to_handler(n) container_of(n, struct input_handler, node)
-#define to_handle(n) container_of(n, struct input_handle, d_node)
-#define to_handle_h(n) container_of(n, struct input_handle, h_node)
-
 struct input_dev *input_allocate_device(void);
 void input_free_device(struct input_dev *dev);
 
 static inline struct input_dev *input_get_device(struct input_dev *dev)
 {
-       return to_input_dev(get_device(&dev->dev));
+       return dev ? to_input_dev(get_device(&dev->dev)) : NULL;
 }
 
 static inline void input_put_device(struct input_dev *dev)
 {
-       put_device(&dev->dev);
+       if (dev)
+               put_device(&dev->dev);
 }
 
 static inline void *input_get_drvdata(struct input_dev *dev)
 {
-       return dev->private;
+       return dev_get_drvdata(&dev->dev);
 }
 
 static inline void input_set_drvdata(struct input_dev *dev, void *data)
 {
-       dev->private = data;
+       dev_set_drvdata(&dev->dev, data);
 }
 
 int __must_check input_register_device(struct input_dev *);