diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-04-07 11:25:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-30 18:10:51 +0300 |
commit | 9059c615a8ba503cb5a7823d7f943a384e6063e3 (patch) | |
tree | f6df13f357b1f4361f3bc5dadedbc2206f43f772 /drivers/staging/panel | |
parent | 67620987c556ee70034bd71703d61d07b4d96e60 (diff) | |
download | linux-9059c615a8ba503cb5a7823d7f943a384e6063e3.tar.xz |
staging: panel: remove duplicate code
both the misc_deregister(), parport_release() and
parport_unregister_device() is there in the module_exit function also.
detach is called from parport_unregister_driver() and by the time
detach executes misc_deregister(), parport_release() and
parport_unregister_device() has already executed marking
keypad_initialized and lcd.initialized as false. so this part of the
code will never execute.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/panel')
-rw-r--r-- | drivers/staging/panel/panel.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index ea54fb4ec837..1d8ed8b35375 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -2252,20 +2252,6 @@ static void panel_detach(struct parport *port) } unregister_reboot_notifier(&panel_notifier); - - if (keypad.enabled && keypad_initialized) { - misc_deregister(&keypad_dev); - keypad_initialized = 0; - } - - if (lcd.enabled && lcd.initialized) { - misc_deregister(&lcd_dev); - lcd.initialized = false; - } - - parport_release(pprt); - parport_unregister_device(pprt); - pprt = NULL; } static struct parport_driver panel_driver = { |