[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1437051500-20419-4-git-send-email-sudipm.mukherjee@gmail.com>
Date: Thu, 16 Jul 2015 18:28:20 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Lidza Louina <lidza.louina@...il.com>,
Mark Hounschell <markh@...pro.net>,
Daeseok Youn <daeseok.youn@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH 4/4] staging: dgap: remove duplicate code
Remove the duplicate code of dgap_remove_one() and dgap_stop().
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/staging/dgap/dgap.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 4f07a0c..b344e03 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -7024,22 +7024,9 @@ static void dgap_stop(bool removesys, struct pci_driver *drv)
static void dgap_remove_one(struct pci_dev *dev)
{
unsigned int i;
- ulong lock_flags;
struct pci_driver *drv = to_pci_driver(dev->dev.driver);
- spin_lock_irqsave(&dgap_poll_lock, lock_flags);
- dgap_poll_stop = 1;
- spin_unlock_irqrestore(&dgap_poll_lock, lock_flags);
-
- /* Turn off poller right away. */
- del_timer_sync(&dgap_poll_timer);
-
- dgap_remove_driver_sysfiles(drv);
-
- device_destroy(dgap_class, MKDEV(DIGI_DGAP_MAJOR, 0));
- class_destroy(dgap_class);
- unregister_chrdev(DIGI_DGAP_MAJOR, "dgap");
-
+ dgap_stop(true, drv);
for (i = 0; i < dgap_numboards; ++i) {
dgap_remove_ports_sysfiles(dgap_board[i]);
dgap_cleanup_tty(dgap_board[i]);
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists