mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Jiri Slaby <jslaby@suse.cz>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux390@de.ibm.com, linux-s390@vger.kernel.org
Subject: [PATCH] s390: fix build failure in con3215.c tty wakeup tasklet
Date: Tue, 17 Apr 2012 12:07:09 -0400	[thread overview]
Message-ID: <1334678829-30823-1-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1334135699-30180-3-git-send-email-jslaby@suse.cz>

Commit 86b26007a37d81e7aca242bb5b649473f8f81297 (tty-next)

    "TTY: con3215, use tty from tty_port"

removed the tty struct from the raw struct, causing:

  CC      drivers/s390/char/con3215.o
drivers/s390/char/con3215.c: In function 'raw3215_wakeup':
drivers/s390/char/con3215.c:339:16: error: 'struct raw3215_info' has no member named 'tty'
make[2]: *** [drivers/s390/char/con3215.o] Error 1

We can't simply add a tty to the args of raw3215_wakeup since
it is registered as a tasklet.  The flow is:

	raw3215_irq
		--> tty_port_tty_get
			--> raw3215_next_io
				--> tasklet_schedule
		--> tty_kref_put

so it seems we'll need to do a get/put in the raw3215_wakeup
tasklet as well.

Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index e928e04..759c43c 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -336,7 +336,13 @@ static inline void raw3215_try_io(struct raw3215_info *raw)
 static void raw3215_wakeup(unsigned long data)
 {
 	struct raw3215_info *raw = (struct raw3215_info *) data;
-	tty_wakeup(raw->tty);
+	struct tty_struct *tty = tty_port_tty_get(&raw->port);
+
+	if (tty == NULL)
+		return;
+
+	tty_wakeup(tty);
+	tty_kref_put(tty);
 }
 
 /*
-- 
1.7.9.1


  reply	other threads:[~2012-04-17 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  9:14 [PATCH 1/3] NET: pc300, move to staging as it is broken Jiri Slaby
2012-04-11  9:14 ` [PATCH 2/3] TTY: con3215, add tty_port Jiri Slaby
2012-04-11  9:14 ` [PATCH 3/3] TTY: con3215, use tty from tty_port Jiri Slaby
2012-04-17 16:07   ` Paul Gortmaker [this message]
2012-04-17 16:14     ` [PATCH] s390: fix build failure in con3215.c tty wakeup tasklet Heiko Carstens
2012-04-13 17:35 ` [PATCH 1/3] NET: pc300, move to staging as it is broken David Miller
2012-04-13 17:41   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334678829-30823-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome