]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/input.h
[POWERPC] iSeries: Use alternate paca structure for booting
[linux-2.6-omap-h63xx.git] / include / linux / input.h
index 48937ffa977ad1f3d3a3d5311babe4dc845bbf33..cae2c35d1206593bc6a3154e44ae47ef1db6fb75 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
@@ -1225,12 +1227,13 @@ 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)