Skip to content

Commit

Permalink
Char: cyclades, fix unused variable
Browse files Browse the repository at this point in the history
drivers/tty/cyclades.c:1454:2: warning: Value stored to 'channel' is never read
	channel = info->line - card->first_line;
	^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix it by moving it to the appropriate debug section where it is used.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 19, 2011
1 parent 4fd53ef commit 0e7f419
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,13 +1445,11 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
{
struct cyclades_card *card;
unsigned long flags;
int channel;

if (!(info->port.flags & ASYNC_INITIALIZED))
return;

card = info->card;
channel = info->line - card->first_line;
if (!cy_is_Z(card)) {
spin_lock_irqsave(&card->card_lock, flags);

Expand All @@ -1476,6 +1474,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
spin_unlock_irqrestore(&card->card_lock, flags);
} else {
#ifdef CY_DEBUG_OPEN
int channel = info->line - card->first_line;
printk(KERN_DEBUG "cyc shutdown Z card %d, channel %d, "
"base_addr %p\n", card, channel, card->base_addr);
#endif
Expand Down

0 comments on commit 0e7f419

Please sign in to comment.