mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
a6698551e5
Upstream commit e4b92b108c6cd6 ("timekeeping: remove obsolete time accessors") removed do_gettimeofday(). In Linux 4.19 this was only a wrapper around ktime_get_real_ts64(). Use ktime_get_real_ts64() now that the wrapper is gone to fix compilation against Linux 5.4. Move the ifxmips_mei_interface header to the include directory, it can't be found otherwise during compilation. The reason for the changed behaviour is not yet clear, however having header files in an include directory is more straight forward. To use the of_device_id struct, the mod_devicetable header need to be included. Instead of including this header, include the of_platform header, which includes the mod_devicetable on its own. Signed-off-by: Mathias Kresin <dev@kresin.me>
72 lines
1.8 KiB
Diff
72 lines
1.8 KiB
Diff
--- a/src/common/drv_dsl_cpe_os_linux.c
|
|
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
|
@@ -11,7 +11,7 @@
|
|
#ifdef __LINUX__
|
|
|
|
#define DSL_INTERN
|
|
-#include <linux/device.h>
|
|
+#include <linux/of_platform.h>
|
|
|
|
#include "drv_dsl_cpe_api.h"
|
|
#include "drv_dsl_cpe_api_ioctl.h"
|
|
@@ -1070,7 +1070,7 @@ static void DSL_DRV_DebugInit(void)
|
|
#endif
|
|
|
|
/* Entry point of driver */
|
|
-int __init DSL_ModuleInit(void)
|
|
+static int __devinit ltq_adsl_probe(struct platform_device *pdev)
|
|
{
|
|
struct class *dsl_class;
|
|
DSL_int_t i;
|
|
@@ -1124,7 +1124,7 @@ int __init DSL_ModuleInit(void)
|
|
return 0;
|
|
}
|
|
|
|
-void __exit DSL_ModuleCleanup(void)
|
|
+static int __devexit ltq_adsl_remove(struct platform_device *pdev)
|
|
{
|
|
printk("Module will be unloaded"DSL_DRV_CRLF);
|
|
|
|
@@ -1139,7 +1139,7 @@ void __exit DSL_ModuleCleanup(void)
|
|
(DSL_uint8_t**)&g_BndFpgaBase);
|
|
#endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/
|
|
|
|
- return;
|
|
+ return 0;
|
|
}
|
|
|
|
#ifndef _lint
|
|
@@ -1155,8 +1155,30 @@ module_param(debug_level, byte, 0);
|
|
MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs");
|
|
#endif /* #ifndef DSL_DEBUG_DISABLE*/
|
|
|
|
-module_init(DSL_ModuleInit);
|
|
-module_exit(DSL_ModuleCleanup);
|
|
+static const struct of_device_id ltq_adsl_match[] = {
|
|
+#ifdef CONFIG_DANUBE
|
|
+ { .compatible = "lantiq,adsl-danube"},
|
|
+#elif defined CONFIG_AMAZON_SE
|
|
+ { .compatible = "lantiq,adsl-ase"},
|
|
+#elif defined CONFIG_AR9
|
|
+ { .compatible = "lantiq,adsl-arx100"},
|
|
+#endif
|
|
+ {},
|
|
+};
|
|
+MODULE_DEVICE_TABLE(of, ltq_adsl_match);
|
|
+
|
|
+static struct platform_driver ltq_adsl_driver = {
|
|
+ .probe = ltq_adsl_probe,
|
|
+ .remove = __devexit_p(ltq_adsl_remove),
|
|
+ .driver = {
|
|
+ .name = "adsl",
|
|
+ .owner = THIS_MODULE,
|
|
+ .of_match_table = ltq_adsl_match,
|
|
+ },
|
|
+};
|
|
+
|
|
+module_platform_driver(ltq_adsl_driver);
|
|
+
|
|
#endif /* #ifndef _lint*/
|
|
|
|
//EXPORT_SYMBOL(DSL_ModuleInit);
|