Merge branch 'bugzilla-13865' into release
authorLen Brown <len.brown@intel.com>
Sun, 2 Aug 2009 15:33:01 +0000 (11:33 -0400)
committerLen Brown <len.brown@intel.com>
Sun, 2 Aug 2009 15:33:01 +0000 (11:33 -0400)
drivers/platform/x86/hp-wmi.c

index ca508564a18144a519ee84c3d88c549b7b5d8ae7..a2ad53e15874ebcbba5b82ba73e4bb3b7f32529e 100644 (file)
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
         * the input layer will only actually pass it on if the state
         * changed.
         */
-
-       input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-       input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-                           hp_wmi_tablet_state());
-       input_sync(hp_wmi_input_dev);
+       if (hp_wmi_input_dev) {
+               input_report_switch(hp_wmi_input_dev, SW_DOCK,
+                                   hp_wmi_dock_state());
+               input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+                                   hp_wmi_tablet_state());
+               input_sync(hp_wmi_input_dev);
+       }
 
        return 0;
 }