From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Lidza Louina <lidza.louina@gmail.com>,
Mark Hounschell <markh@compro.net>,
Daeseok Youn <daeseok.youn@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 4/4] staging: dgap: remove duplicate code
Date: Thu, 16 Jul 2015 18:28:20 +0530 [thread overview]
Message-ID: <1437051500-20419-4-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1437051500-20419-1-git-send-email-sudipm.mukherjee@gmail.com>
Remove the duplicate code of dgap_remove_one() and dgap_stop().
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.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
next prev parent reply other threads:[~2015-07-16 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 12:58 [PATCH 1/4] staging: dgap: fix error path Sudip Mukherjee
2015-07-16 12:58 ` [PATCH 2/4] staging: dgap: rearrange function Sudip Mukherjee
2015-07-16 12:58 ` [PATCH 3/4] staging: dgap: new arguments to dgap_stop Sudip Mukherjee
2015-07-16 12:58 ` Sudip Mukherjee [this message]
2015-07-17 9:30 ` [PATCH 1/4] staging: dgap: fix error path Dan Carpenter
2015-07-17 9:51 ` Sudip Mukherjee
2015-07-17 10:05 ` Dan Carpenter
2015-07-17 10:27 ` Sudip Mukherjee
2015-07-17 10:52 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437051500-20419-4-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=daeseok.youn@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®