diff -urpN -X ../dontdiff linux-2.6.17-rmk-20jun2006/arch/arm/mach-s3c2410/cpu.h linux-2.6.17-rmk-20jun2006-2410sysdev/arch/arm/mach-s3c2410/cpu.h --- linux-2.6.17-rmk-20jun2006/arch/arm/mach-s3c2410/cpu.h 2006-06-20 18:08:56.000000000 +0100 +++ linux-2.6.17-rmk-20jun2006-2410sysdev/arch/arm/mach-s3c2410/cpu.h 2006-06-21 14:14:13.000000000 +0100 @@ -73,5 +73,6 @@ extern struct sys_timer s3c24xx_timer; /* system device classes */ +extern struct sysdev_class s3c2410_sysclass; extern struct sysdev_class s3c2440_sysclass; extern struct sysdev_class s3c2442_sysclass; diff -urpN -X ../dontdiff linux-2.6.17-rmk-20jun2006/arch/arm/mach-s3c2410/s3c2410.c linux-2.6.17-rmk-20jun2006-2410sysdev/arch/arm/mach-s3c2410/s3c2410.c --- linux-2.6.17-rmk-20jun2006/arch/arm/mach-s3c2410/s3c2410.c 2006-06-20 18:08:56.000000000 +0100 +++ linux-2.6.17-rmk-20jun2006-2410sysdev/arch/arm/mach-s3c2410/s3c2410.c 2006-06-21 14:13:46.000000000 +0100 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -110,9 +111,30 @@ void __init s3c2410_init_clocks(int xtal s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); } +struct sysdev_class s3c2410_sysclass = { + set_kset_name("s3c2410-core"), +}; + +static struct sys_device s3c2410_sysdev = { + .cls = &s3c2410_sysclass, +}; + +/* need to register class before we actually register the device, and + * we also need to ensure that it has been initialised before any of the + * drivers even try to use it (even if not on an s3c2440 based system) + * as a driver which may support both 2410 and 2440 may try and use it. +*/ + +static int __init s3c2410_core_init(void) +{ + return sysdev_class_register(&s3c2410_sysclass); +} + +core_initcall(s3c2410_core_init); + int __init s3c2410_init(void) { printk("S3C2410: Initialising architecture\n"); - return 0; + return sysdev_register(&s3c2410_sysdev); }