summaryrefslogtreecommitdiff
path: root/net/irda/ircomm/ircomm_param.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-06-04 13:35:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-12 15:50:24 -0700
commit62f228acb807c370c3b1583bf0f1aa4ab8e19aca (patch)
tree770750aa0c324f286582d6317aa2d41d5e2cc122 /net/irda/ircomm/ircomm_param.c
parente673927d8a210ab1db27047080fc1bdb47f7e372 (diff)
TTY: ircomm, use tty from tty_port
This also includes a switch to tty refcounting. It makes sure, the code no longer can access a freed TTY struct. Sometimes the only thing needed is to pass tty down to the callies. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/irda/ircomm/ircomm_param.c')
-rw-r--r--net/irda/ircomm/ircomm_param.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index 8b915f3ac3b9..308939128359 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -99,7 +99,6 @@ pi_param_info_t ircomm_param_info = { pi_major_call_table, 3, 0x0f, 4 };
*/
int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
{
- struct tty_struct *tty;
unsigned long flags;
struct sk_buff *skb;
int count;
@@ -109,10 +108,6 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
- tty = self->tty;
- if (!tty)
- return 0;
-
/* Make sure we don't send parameters for raw mode */
if (self->service_type == IRCOMM_3_WIRE_RAW)
return 0;