linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: panel: remove duplicate code
@ 2015-04-07  8:25 Sudip Mukherjee
  2015-04-07  8:49 ` Dan Carpenter
  0 siblings, 1 reply; 12+ messages in thread
From: Sudip Mukherjee @ 2015-04-07  8:25 UTC (permalink / raw)
  To: Willy Tarreau, Greg Kroah-Hartman; +Cc: devel, linux-kernel, Sudip Mukherjee

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>
---
 drivers/staging/panel/panel.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index ea54fb4..1d8ed8b 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 = {
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-07 14:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07  8:25 [PATCH] staging: panel: remove duplicate code Sudip Mukherjee
2015-04-07  8:49 ` Dan Carpenter
2015-04-07  9:25   ` Sudip Mukherjee
2015-04-07  9:44     ` Greg Kroah-Hartman
2015-04-07  9:56       ` Sudip Mukherjee
2015-04-07 10:12         ` Greg Kroah-Hartman
2015-04-07 14:14           ` Willy Tarreau
2015-04-07 14:21             ` Sudip Mukherjee
2015-04-07 14:33               ` Willy Tarreau
2015-04-07 14:41           ` Sudip Mukherjee
2015-04-07  9:45     ` Dan Carpenter
2015-04-07 10:36       ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).