2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/Makefile.in
|
|
|
|
+++ b/src/Makefile.in
|
|
|
|
@@ -63,7 +63,7 @@ POST_UNINSTALL = :
|
2013-03-14 18:43:18 +00:00
|
|
|
|
|
|
|
# the headerfile of linux kernels 2.6.x contain to much arithmetic
|
|
|
|
# with void pointers (which is allowed for gcc!)
|
2015-09-14 20:09:22 +00:00
|
|
|
-@KERNEL_2_6_FALSE@am__append_6 = -Wpointer-arith
|
|
|
|
+@KERNEL_2_6_FALSE@am__append_6 =
|
2013-03-14 18:43:18 +00:00
|
|
|
subdir = src
|
2015-09-14 20:09:22 +00:00
|
|
|
DIST_COMMON = $(drv_dsl_cpe_api_include_HEADERS) $(srcdir)/Makefile.am \
|
|
|
|
$(srcdir)/Makefile.in
|
|
|
|
--- a/src/common/drv_dsl_cpe_os_linux.c
|
|
|
|
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
|
|
|
@@ -11,6 +11,7 @@
|
2013-03-14 18:43:18 +00:00
|
|
|
|
|
|
|
#define DSL_INTERN
|
|
|
|
|
|
|
|
+#include <linux/device.h>
|
|
|
|
#include "drv_dsl_cpe_api.h"
|
|
|
|
#include "drv_dsl_cpe_api_ioctl.h"
|
|
|
|
|
2015-11-24 20:41:07 +00:00
|
|
|
@@ -238,14 +239,7 @@ static DSL_long_t DSL_DRV_Ioctls(DSL_DRV
|
2013-03-14 18:43:18 +00:00
|
|
|
}
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
|
|
|
- if (pFile->f_dentry != DSL_NULL)
|
|
|
|
- {
|
|
|
|
- pINode = pFile->f_dentry->d_inode;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- pINode = DSL_NULL;
|
|
|
|
- }
|
|
|
|
+ pINode = file_inode(pFile);
|
|
|
|
#endif
|
|
|
|
|
2015-11-24 20:41:07 +00:00
|
|
|
if (pINode == DSL_NULL)
|
|
|
|
@@ -1118,6 +1112,9 @@ static void DSL_DRV_DebugInit(void)
|
2015-09-14 20:09:22 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static struct class *dsl_class;
|
|
|
|
+static dev_t dsl_devt;
|
|
|
|
+
|
|
|
|
/* Entry point of driver */
|
2013-03-14 18:43:18 +00:00
|
|
|
int __init DSL_ModuleInit(void)
|
|
|
|
{
|
2015-11-24 20:41:07 +00:00
|
|
|
@@ -1156,6 +1153,10 @@ int __init DSL_ModuleInit(void)
|
2013-03-14 18:43:18 +00:00
|
|
|
|
|
|
|
DSL_DRV_DevNodeInit();
|
|
|
|
|
|
|
|
+ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
|
2015-09-14 20:09:22 +00:00
|
|
|
+ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
|
|
|
|
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0");
|
2013-03-14 18:43:18 +00:00
|
|
|
+
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-24 20:41:07 +00:00
|
|
|
@@ -1163,6 +1164,11 @@ void __exit DSL_ModuleCleanup(void)
|
2015-09-14 20:09:22 +00:00
|
|
|
{
|
|
|
|
printk("Module will be unloaded"DSL_DRV_CRLF);
|
2013-03-14 18:43:18 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+ device_destroy(dsl_class, dsl_devt);
|
|
|
|
+ dsl_devt = NULL;
|
|
|
|
+ class_destroy(dsl_class);
|
|
|
|
+ dsl_class = NULL;
|
2013-03-14 18:43:18 +00:00
|
|
|
+
|
2015-09-14 20:09:22 +00:00
|
|
|
unregister_chrdev(nMajorNum, DRV_DSL_CPE_API_DEV_NAME);
|
|
|
|
|
|
|
|
DSL_DRV_Cleanup();
|