NET: wan/x25_asy, move lapb_unregister to x25_asy_close_tty
authorJiri Slaby <jslaby@suse.cz>
Wed, 24 Nov 2010 13:54:54 +0000 (13:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Nov 2010 19:43:47 +0000 (11:43 -0800)
commit03fe5f3ef7eab88e1405baa52a7923fbf337230b
tree94ca359bee9d5f4121af252310d4eb9293d45d9a
parent42eb59d3a80ff83b4cacb92dcc44b22da7d4969b
NET: wan/x25_asy, move lapb_unregister to x25_asy_close_tty

We register lapb when tty is created, but unregister it only when the
device is UP. So move the lapb_unregister to x25_asy_close_tty after
the device is down.

The old behaviour causes ldisc switching to fail each second attempt,
because we noted for us that the device is unused, so we use it the
second time, but labp layer still have it registered, so it fails
obviously.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Sergey Lapin <slapin@ossfans.org>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Tested-by: Sergey Lapin <slapin@ossfans.org>
Tested-by: Mikhail Ulyanov <ulyanov.mikhail@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/x25_asy.c