Device support for basic device

Device support for basic device

Post by Pavel Mache » Sat, 20 Apr 2002 07:10:11



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

 #include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
+#include <linux/device.h>

 #include <asm/atomic.h>

                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

 #include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/module.h>
+#include <linux/device.h>

 #include <asm/io.h>

 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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/