aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-sci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
index 74704be7b1fe..9a2e590dd202 100644
--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
@@ -460,7 +460,6 @@ static int setup_power_button(struct platform_device *pdev)
460static void free_power_button(void) 460static void free_power_button(void)
461{ 461{
462 input_unregister_device(power_button_idev); 462 input_unregister_device(power_button_idev);
463 input_free_device(power_button_idev);
464} 463}
465 464
466static int setup_ebook_switch(struct platform_device *pdev) 465static int setup_ebook_switch(struct platform_device *pdev)
@@ -491,7 +490,6 @@ static int setup_ebook_switch(struct platform_device *pdev)
491static void free_ebook_switch(void) 490static void free_ebook_switch(void)
492{ 491{
493 input_unregister_device(ebook_switch_idev); 492 input_unregister_device(ebook_switch_idev);
494 input_free_device(ebook_switch_idev);
495} 493}
496 494
497static int setup_lid_switch(struct platform_device *pdev) 495static int setup_lid_switch(struct platform_device *pdev)
@@ -526,6 +524,7 @@ static int setup_lid_switch(struct platform_device *pdev)
526 524
527err_create_attr: 525err_create_attr:
528 input_unregister_device(lid_switch_idev); 526 input_unregister_device(lid_switch_idev);
527 lid_switch_idev = NULL;
529err_register: 528err_register:
530 input_free_device(lid_switch_idev); 529 input_free_device(lid_switch_idev);
531 return r; 530 return r;
@@ -535,7 +534,6 @@ static void free_lid_switch(void)
535{ 534{
536 device_remove_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode); 535 device_remove_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode);
537 input_unregister_device(lid_switch_idev); 536 input_unregister_device(lid_switch_idev);
538 input_free_device(lid_switch_idev);
539} 537}
540 538
541static int xo1_sci_probe(struct platform_device *pdev) 539static int xo1_sci_probe(struct platform_device *pdev)