drivers:misc: ti-st: avoid a misleading dbg msg
authorPavan Savoy <pavan_savoy@ti.com>
Wed, 10 Aug 2011 15:18:30 +0000 (10:18 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Aug 2011 21:13:31 +0000 (14:13 -0700)
Previously the private data of each protocol registered to use ST was
used to determine whether the protocol was registered to use shared
transport or otherwise.
However, now a flag is_registered is maintained to identify whether a
protocol intends to use ST.
Upon closing of the UART the error message relevant to this lack of
un-registration was misleading and this patch fixes that.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/ti-st/st_core.c

index 54c91ffe4a9154fb7142f5f61a654658e8ab1fd0..c8e335db34514c665e9563d3abe6ac244aa70975 100644 (file)
@@ -717,7 +717,7 @@ static void st_tty_close(struct tty_struct *tty)
         */
        spin_lock_irqsave(&st_gdata->lock, flags);
        for (i = ST_BT; i < ST_MAX_CHANNELS; i++) {
-               if (st_gdata->list[i] != NULL)
+               if (st_gdata->is_registered[i] == true)
                        pr_err("%d not un-registered", i);
                st_gdata->list[i] = NULL;
        }