* Device support for basic device
@ 2002-04-18 22:03 Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2002-04-18 22:03 UTC (permalink / raw)
To: kernel list, torvalds
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-18 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-18 22:03 Device support for basic device Pavel Machek
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®