virtio: console: Add a find_port_by_devt() function
authorAmit Shah <amit.shah@redhat.com>
Thu, 2 Sep 2010 12:50:58 +0000 (18:20 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Oct 2010 07:14:03 +0000 (17:44 +1030)
commit04950cdf071b6e5aa4794c93ad3e3ce8a1c4aa8c
tree24a8d32ee63ef7c0a634e67dc67fdef0f84a14a6
parent6bdf2afd02ae12bf8ac93e6d14c4b4dfef7c4c59
virtio: console: Add a find_port_by_devt() function

To convert to using cdev as a pointer to avoid kref troubles, we have to
use a different method to get to a port from an inode than the current
container_of method.

Add find_port_by_devt() that looks up all portdevs and ports with those
portdevs to find the right port.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c