1 Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
2 ===================================================================
3 --- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c 2012-12-07 21:22:58.020256076 +0100
4 +++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c 2012-12-07 21:31:13.156268489 +0100
8 #include <linux/device.h>
9 +#include <linux/platform_device.h>
11 #include "drv_dsl_cpe_api.h"
12 #include "drv_dsl_cpe_api_ioctl.h"
16 /* Entry point of driver */
17 -int __init DSL_ModuleInit(void)
18 +static int __devinit ltq_adsl_probe(struct platform_device *pdev)
20 struct class *dsl_class;
26 -void __exit DSL_ModuleCleanup(void)
27 +static int __devexit ltq_adsl_remove(struct platform_device *pdev)
29 printk("Module will be unloaded"DSL_DRV_CRLF);
32 (DSL_uint8_t**)&g_BndFpgaBase);
33 #endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/
40 @@ -1148,8 +1149,30 @@
41 MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs");
42 #endif /* #ifndef DSL_DEBUG_DISABLE*/
44 -module_init(DSL_ModuleInit);
45 -module_exit(DSL_ModuleCleanup);
46 +static const struct of_device_id ltq_adsl_match[] = {
48 + { .compatible = "lantiq,adsl-danube"},
49 +#elif defined CONFIG_AMAZON_SE
50 + { .compatible = "lantiq,adsl-ase"},
51 +#elif defined CONFIG_AR9
52 + { .compatible = "lantiq,adsl-arx100"},
56 +MODULE_DEVICE_TABLE(of, ltq_adsl_match);
58 +static struct platform_driver ltq_adsl_driver = {
59 + .probe = ltq_adsl_probe,
60 + .remove = __devexit_p(ltq_adsl_remove),
63 + .owner = THIS_MODULE,
64 + .of_match_table = ltq_adsl_match,
68 +module_platform_driver(ltq_adsl_driver);
70 #endif /* #ifndef _lint*/
72 //EXPORT_SYMBOL(DSL_ModuleInit);