Merge branch 'misc' into devel
[sfrench/cifs-2.6.git] / arch / x86 / kernel / i8259.c
index 7c9f02c130f3ca9167e81205f39c968174a8e9ef..cafa7c80ac95714e7097ba06ff195cd6f285417f 100644 (file)
@@ -276,16 +276,6 @@ static struct sys_device device_i8259A = {
        .cls    = &i8259_sysdev_class,
 };
 
-static int __init i8259A_init_sysfs(void)
-{
-       int error = sysdev_class_register(&i8259_sysdev_class);
-       if (!error)
-               error = sysdev_register(&device_i8259A);
-       return error;
-}
-
-device_initcall(i8259A_init_sysfs);
-
 static void mask_8259A(void)
 {
        unsigned long flags;
@@ -407,3 +397,18 @@ struct legacy_pic default_legacy_pic = {
 };
 
 struct legacy_pic *legacy_pic = &default_legacy_pic;
+
+static int __init i8259A_init_sysfs(void)
+{
+       int error;
+
+       if (legacy_pic != &default_legacy_pic)
+               return 0;
+
+       error = sysdev_class_register(&i8259_sysdev_class);
+       if (!error)
+               error = sysdev_register(&device_i8259A);
+       return error;
+}
+
+device_initcall(i8259A_init_sysfs);