Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282366
b: refs/heads/master
c: 1729ad1
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Nov 5, 2011
1 parent d2081fb commit 45a017b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb6c721b69d4ac518b9be6de8f44ba87a0c0d235
refs/heads/master: 1729ad1f4f9e167ade84ca8b5269695c42351160
23 changes: 15 additions & 8 deletions trunk/drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ static int i8042_controller_init(void)
* Reset the controller and reset CRT to the original value set by BIOS.
*/

static void i8042_controller_reset(void)
static void i8042_controller_reset(bool force_reset)
{
i8042_flush();

Expand All @@ -1016,7 +1016,7 @@ static void i8042_controller_reset(void)
* Reset the controller if requested.
*/

if (i8042_reset)
if (i8042_reset || force_reset)
i8042_controller_selftest();

/*
Expand Down Expand Up @@ -1139,9 +1139,9 @@ static int i8042_controller_resume(bool force_reset)
* upsetting it.
*/

static int i8042_pm_reset(struct device *dev)
static int i8042_pm_suspend(struct device *dev)
{
i8042_controller_reset();
i8042_controller_reset(true);

return 0;
}
Expand All @@ -1163,13 +1163,20 @@ static int i8042_pm_thaw(struct device *dev)
return 0;
}

static int i8042_pm_reset(struct device *dev)
{
i8042_controller_reset(false);

return 0;
}

static int i8042_pm_restore(struct device *dev)
{
return i8042_controller_resume(false);
}

static const struct dev_pm_ops i8042_pm_ops = {
.suspend = i8042_pm_reset,
.suspend = i8042_pm_suspend,
.resume = i8042_pm_resume,
.thaw = i8042_pm_thaw,
.poweroff = i8042_pm_reset,
Expand All @@ -1185,7 +1192,7 @@ static const struct dev_pm_ops i8042_pm_ops = {

static void i8042_shutdown(struct platform_device *dev)
{
i8042_controller_reset();
i8042_controller_reset(false);
}

static int __init i8042_create_kbd_port(void)
Expand Down Expand Up @@ -1424,7 +1431,7 @@ static int __init i8042_probe(struct platform_device *dev)
out_fail:
i8042_free_aux_ports(); /* in case KBD failed but AUX not */
i8042_free_irqs();
i8042_controller_reset();
i8042_controller_reset(false);
i8042_platform_device = NULL;

return error;
Expand All @@ -1434,7 +1441,7 @@ static int __devexit i8042_remove(struct platform_device *dev)
{
i8042_unregister_ports();
i8042_free_irqs();
i8042_controller_reset();
i8042_controller_reset(false);
i8042_platform_device = NULL;

return 0;
Expand Down

0 comments on commit 45a017b

Please sign in to comment.