All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-serial@vger.kernel.org
Subject: Curious about tty_port_operations drop() callback.
Date: Tue, 22 Jan 2013 16:38:54 +0000 (UTC)	[thread overview]
Message-ID: <kdmfat$dt9$1@ger.gmane.org> (raw)

While testing/debugging the tty driver I've changed to use the
tty_port_* helper functions, I noticed there are two
tty_port_operation fields that I'm not providing: destruct() and
drop(). There's an example of destruct() usage in the hvc driver and a
comment in tty.h explaining when it's called, so that's fairly
obvious.

I haven't been able to figure out the purpose of the drop() callback.
It's not used anywhere and there is no comment in tty.h hinting at its
purpose.

Looking at tty_port_close() shows that drop() is called during close()
of port with a reference count > 1.  IOW, close() calls drop() in the
cases where it isn't going to call shutdown().

There doesn't seem to be a corresponding "raise" callback during
open() when activate() isn't going to be called, and I can't think of
any use for either drop or raise...

-- 
Grant Edwards               grant.b.edwards        Yow! My mind is a potato
                                  at               field ...
                              gmail.com            


             reply	other threads:[~2013-01-22 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 16:38 Grant Edwards [this message]
2013-01-23 14:38 ` Curious about tty_port_operations drop() callback Alan Cox

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='kdmfat$dt9$1@ger.gmane.org' \
    --to=grant.b.edwards@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.