From: Pavel Machek <pavel@ucw.cz>
To: kernel list <linux-kernel@vger.kernel.org>, torvalds@transmeta.com
Subject: Device support for basic device
Date: Fri, 19 Apr 2002 00:03:04 +0200 [thread overview]
Message-ID: <20020418220303.GA17913@elf.ucw.cz> (raw)
Hi!
This adds support for devicefs for i8259.c and time.c. Please apply,
Pavel
--- linux/arch/i386/kernel/i8259.c Thu Apr 18 22:44:39 2002
+++ linux-dm/arch/i386/kernel/i8259.c Thu Apr 18 23:48:49 2002
@@ -11,6 +11,7 @@
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/kernel_stat.h>
+#include <linux/device.h>
#include <asm/atomic.h>
#include <asm/system.h>
@@ -236,6 +237,18 @@
goto handle_real_irq;
}
}
+
+static struct device device_i8259A = {
+ name: "i8259A",
+ bus_id: "0020",
+};
+
+static void __init init_8259A_devicefs(void)
+{
+ register_sys_device(&device_i8259A);
+}
+
+__initcall(init_8259A_devicefs);
void __init init_8259A(int auto_eoi)
{
--- linux/arch/i386/kernel/time.c Sun Mar 10 20:07:25 2002
+++ linux-dm/arch/i386/kernel/time.c Thu Apr 18 23:48:30 2002
@@ -42,6 +42,7 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/module.h>
+#include <linux/device.h>
#include <asm/io.h>
#include <asm/smp.h>
@@ -635,6 +636,17 @@
bad_ctc:
return 0;
}
+
+static struct device device_i8253;
+
+static void time_init_driverfs(void)
+{
+ strcpy(device_i8253.name, "i8253");
+ strcpy(device_i8253.bus_id, "0040");
+ register_sys_device(&device_i8253);
+}
+
+__initcall(time_init_driverfs);
void __init time_init(void)
{
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
reply other threads:[~2002-04-18 22:06 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=20020418220303.GA17913@elf.ucw.cz \
--to=pavel@ucw.cz \
--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
all inboxes | Powered by JetHome®