2011-08-01 20:42:00 +03:00
|
|
|
--- a/compat/Makefile
|
|
|
|
+++ b/compat/Makefile
|
2012-05-30 04:01:06 +03:00
|
|
|
@@ -1,7 +1,10 @@
|
2011-08-01 20:42:00 +03:00
|
|
|
obj-m += compat.o
|
|
|
|
#compat-objs :=
|
|
|
|
|
|
|
|
-obj-$(CONFIG_COMPAT_FIRMWARE_CLASS) += compat_firmware_class.o
|
|
|
|
+ifdef CONFIG_COMPAT_FIRMWARE_CLASS
|
|
|
|
+ compat-y += compat_firmware_class.o
|
|
|
|
+endif
|
|
|
|
+
|
2012-05-30 04:01:06 +03:00
|
|
|
obj-$(CONFIG_COMPAT_NET_SCH_CODEL) += sch_codel.o
|
|
|
|
|
2012-09-08 14:10:54 +03:00
|
|
|
sch_fq_codel-y = sch_fq_codel_core.o flow_dissector.o
|
2011-08-01 20:52:07 +03:00
|
|
|
--- a/compat/compat_firmware_class.c
|
|
|
|
+++ b/compat/compat_firmware_class.c
|
2012-04-17 00:08:41 +03:00
|
|
|
@@ -741,19 +741,16 @@ compat_request_firmware_nowait(
|
2011-08-01 20:52:07 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
-static int __init firmware_class_init(void)
|
|
|
|
+int __init firmware_class_init(void)
|
|
|
|
{
|
|
|
|
return class_register(&firmware_class);
|
|
|
|
}
|
|
|
|
|
|
|
|
-static void __exit firmware_class_exit(void)
|
|
|
|
+void __exit firmware_class_exit(void)
|
|
|
|
{
|
|
|
|
class_unregister(&firmware_class);
|
|
|
|
}
|
|
|
|
|
|
|
|
-fs_initcall(firmware_class_init);
|
|
|
|
-module_exit(firmware_class_exit);
|
|
|
|
-
|
2012-04-17 00:08:41 +03:00
|
|
|
EXPORT_SYMBOL_GPL(release_firmware);
|
|
|
|
EXPORT_SYMBOL_GPL(request_firmware);
|
|
|
|
EXPORT_SYMBOL_GPL(request_firmware_nowait);
|
2011-08-01 20:52:07 +03:00
|
|
|
--- a/compat/main.c
|
|
|
|
+++ b/compat/main.c
|
2012-05-30 04:01:06 +03:00
|
|
|
@@ -47,6 +47,17 @@ void compat_dependency_symbol(void)
|
2012-04-17 00:08:41 +03:00
|
|
|
EXPORT_SYMBOL_GPL(compat_dependency_symbol);
|
2011-08-01 20:52:07 +03:00
|
|
|
|
2012-05-30 04:01:06 +03:00
|
|
|
|
2011-08-01 20:52:07 +03:00
|
|
|
+#if defined(CONFIG_FW_LOADER) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
|
|
|
+int __init firmware_class_init(void);
|
|
|
|
+void __exit firmware_class_exit(void);
|
|
|
|
+#else
|
2011-08-02 00:14:15 +03:00
|
|
|
+static inline int firmware_class_init(void)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
2011-08-01 20:52:07 +03:00
|
|
|
+static inline void firmware_class_exit(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
static int __init compat_init(void)
|
|
|
|
{
|
2012-05-30 04:01:06 +03:00
|
|
|
compat_pm_qos_power_init();
|
|
|
|
@@ -63,7 +74,8 @@ static int __init compat_init(void)
|
|
|
|
printk(KERN_INFO "compat.git: "
|
|
|
|
COMPAT_BASE_TREE "\n");
|
2011-08-01 20:52:07 +03:00
|
|
|
|
|
|
|
- return 0;
|
|
|
|
+ firmware_class_init();
|
|
|
|
+ return 0;
|
|
|
|
}
|
|
|
|
module_init(compat_init);
|
|
|
|
|
2012-05-30 04:01:06 +03:00
|
|
|
@@ -72,7 +84,8 @@ static void __exit compat_exit(void)
|
2011-08-01 20:52:07 +03:00
|
|
|
compat_pm_qos_power_deinit();
|
2011-11-18 13:27:19 +02:00
|
|
|
compat_system_workqueue_destroy();
|
|
|
|
|
2011-08-01 20:52:07 +03:00
|
|
|
- return;
|
|
|
|
+ firmware_class_exit();
|
2011-11-18 13:27:19 +02:00
|
|
|
+ return;
|
2011-08-01 20:52:07 +03:00
|
|
|
}
|
|
|
|
module_exit(compat_exit);
|
|
|
|
|