public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linus Torvalds <torvalds@transmeta.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Register tty_devclass before use
Date: Sat, 8 Mar 2003 12:11:03 +0000	[thread overview]
Message-ID: <20030308121103.C29145@flint.arm.linux.org.uk> (raw)

Hi,

The following patch (against vanilla 2.5.64) registers the tty devclass
with sysfs before any drivers can use it - sysfs requires structures to
be registered before use.

The patch applies to bk-curr with offset.

--- orig/drivers/char/tty_io.c	Wed Mar  5 19:45:15 2003
+++ linux/drivers/char/tty_io.c	Sat Mar  8 12:01:41 2003
@@ -2307,14 +2307,19 @@
 };
 EXPORT_SYMBOL(tty_devclass);
 
+static int __init tty_devclass_init(void)
+{
+	return devclass_register(&tty_devclass);
+}
+
+postcore_initcall(tty_devclass_init);
+
 /*
  * Ok, now we can initialize the rest of the tty devices and can count
  * on memory allocations, interrupts etc..
  */
 void __init tty_init(void)
 {
-	devclass_register(&tty_devclass);
-
 	/*
 	 * dev_tty_driver and dev_console_driver are actually magic
 	 * devices which get redirected at open time.  Nevertheless,

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


                 reply	other threads:[~2003-03-08 19:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030308121103.C29145@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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