char: lp: detach the device when parallel port is removed
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 7 Dec 2018 14:27:31 +0000 (14:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Dec 2018 09:40:17 +0000 (10:40 +0100)
commitd6318c0e8318c200aa95b50769d3635907381c08
tree0be847f7b75c128ea4713fcd6aa33e8c3f851561
parent0edf39d2c7dbb4947358dd102b6ff35eaaa92d68
char: lp: detach the device when parallel port is removed

When the parallel port is usb based and the lp attaches to it, we do
get /dev/lp0, but when we remove the usb device and the parallel port
is gone, we are still left with /dev/lp0.
Unregister the device properly in the detach routine based on the port
number it has connected to.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/lp.c