From: Daeseok Youn <daeseok.youn@gmail.com>
To: lidza.louina@gmail.com, gregkh@linuxfoundation.org
Cc: markh@compro.net, dan.carpenter@oracle.com,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] staging: dgap: introduce dgap_tty_unregister()
Date: Fri, 13 Jun 2014 16:41:47 +0900 [thread overview]
Message-ID: <20140613074147.GA31615@devel.8.8.4.4> (raw)
dgap_tty_unregister() will unregister serial_driver
and print_driver, and also free related variables.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgap/dgap.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 497e6f3..4ea7a33 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -122,6 +122,7 @@ static int dgap_tty_put_char(struct tty_struct *tty, unsigned char c);
static void dgap_tty_send_xchar(struct tty_struct *tty, char ch);
static int dgap_tty_register(struct board_t *brd);
+static void dgap_tty_unregister(struct board_t *brd);
static int dgap_tty_init(struct board_t *);
static void dgap_tty_free(struct board_t *);
static void dgap_cleanup_tty(struct board_t *);
@@ -1320,6 +1321,14 @@ free_serial_drv:
return rc;
}
+static void dgap_tty_unregister(struct board_t *brd)
+{
+ tty_unregister_driver(brd->print_driver);
+ tty_unregister_driver(brd->serial_driver);
+ put_tty_driver(brd->print_driver);
+ put_tty_driver(brd->serial_driver);
+}
+
/*
* dgap_tty_init()
*
--
1.7.1
next reply other threads:[~2014-06-13 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 7:41 Daeseok Youn [this message]
2014-06-13 8:00 ` [PATCH 5/9] staging: dgap: introduce dgap_tty_unregister() Dan Carpenter
2014-06-13 8:16 ` DaeSeok Youn
2014-06-13 8:38 ` Dan Carpenter
2014-06-13 8:50 ` DaeSeok Youn
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=20140613074147.GA31615@devel.8.8.4.4 \
--to=daeseok.youn@gmail.com \
--cc=dan.carpenter@oracle.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;
as well as URLs for NNTP newsgroup(s).