Commit abcf47dd authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Vojtech Pavlik

Input: i8042 - get rid of reboot notifier as suspend method

       should do the job.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 646d13d8
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/reboot.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/pm.h>
#include <linux/serio.h> #include <linux/serio.h>
#include <linux/err.h> #include <linux/err.h>
...@@ -824,27 +821,6 @@ void i8042_controller_cleanup(void) ...@@ -824,27 +821,6 @@ void i8042_controller_cleanup(void)
} }
/*
* We need to reset the 8042 back to original mode on system shutdown,
* because otherwise BIOSes will be confused.
*/
static int i8042_notify_sys(struct notifier_block *this, unsigned long code,
void *unused)
{
if (code == SYS_DOWN || code == SYS_HALT)
i8042_controller_cleanup();
return NOTIFY_DONE;
}
static struct notifier_block i8042_notifier =
{
i8042_notify_sys,
NULL,
0
};
/* /*
* Here we try to restore the original BIOS settings * Here we try to restore the original BIOS settings
*/ */
...@@ -904,6 +880,11 @@ static int i8042_resume(struct device *dev, u32 level) ...@@ -904,6 +880,11 @@ static int i8042_resume(struct device *dev, u32 level)
} }
/*
* We need to reset the 8042 back to original mode on system shutdown,
* because otherwise BIOSes will be confused.
*/
static void i8042_shutdown(struct device *dev) static void i8042_shutdown(struct device *dev)
{ {
i8042_controller_cleanup(); i8042_controller_cleanup();
...@@ -1031,8 +1012,6 @@ int __init i8042_init(void) ...@@ -1031,8 +1012,6 @@ int __init i8042_init(void)
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
register_reboot_notifier(&i8042_notifier);
return 0; return 0;
} }
...@@ -1040,8 +1019,6 @@ void __exit i8042_exit(void) ...@@ -1040,8 +1019,6 @@ void __exit i8042_exit(void)
{ {
int i; int i;
unregister_reboot_notifier(&i8042_notifier);
i8042_controller_cleanup(); i8042_controller_cleanup();
if (i8042_kbd_values.exists) if (i8042_kbd_values.exists)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment