Device support for basic device

Pavel Machek (pavel@ucw.cz)
Fri, 19 Apr 2002 00:03:04 +0200


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/