From: Jiri Slaby Date: Sat, 19 Sep 2009 20:13:12 +0000 (-0700) Subject: cyclades: add tty refcounting X-Git-Tag: v2.6.32-rc1~627^2~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d13549f804d2965a9f279a8ff867f35d949572c8;p=pandora-kernel.git cyclades: add tty refcounting While this is not problem for Y card handlers (they are protected by card_lock), Z handlers and other functions may dereference NULL at any point after hangup/close. Even if (tty == NULL) was already performed in the handler. Note that it's not an issue for Y cards just for now. After switching to tty_port_close_* et al. this will be a problem. So add refcounting to them all. Also proc .show doesn't take a tty reference and it should (along with a ldisc one). While at it and changing prototypes (adding tty param), prepend cy_ to functions which don't have it yet. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed