@@ -19,12 +19,12 @@ static struct class *class;
19
19
20
20
struct workqueue_struct * workqueue ;
21
21
22
- static int ksort_open (struct inode * inode , struct file * file )
22
+ static int sort_open (struct inode * inode , struct file * file )
23
23
{
24
24
return 0 ;
25
25
}
26
26
27
- static int ksort_release (struct inode * inode , struct file * file )
27
+ static int sort_release (struct inode * inode , struct file * file )
28
28
{
29
29
return 0 ;
30
30
}
@@ -34,10 +34,10 @@ static int num_compare(const void *a, const void *b)
34
34
return (* (int * ) a - * (int * ) b );
35
35
}
36
36
37
- static ssize_t ksort_read (struct file * file ,
38
- char * buf ,
39
- size_t size ,
40
- loff_t * offset )
37
+ static ssize_t sort_read (struct file * file ,
38
+ char * buf ,
39
+ size_t size ,
40
+ loff_t * offset )
41
41
{
42
42
unsigned long len ;
43
43
size_t es ;
@@ -68,23 +68,23 @@ static ssize_t ksort_read(struct file *file,
68
68
return size ;
69
69
}
70
70
71
- static ssize_t ksort_write (struct file * file ,
72
- const char * buf ,
73
- size_t size ,
74
- loff_t * offset )
71
+ static ssize_t sort_write (struct file * file ,
72
+ const char * buf ,
73
+ size_t size ,
74
+ loff_t * offset )
75
75
{
76
76
return 0 ;
77
77
}
78
78
79
79
static const struct file_operations fops = {
80
- .read = ksort_read ,
81
- .write = ksort_write ,
82
- .open = ksort_open ,
83
- .release = ksort_release ,
80
+ .read = sort_read ,
81
+ .write = sort_write ,
82
+ .open = sort_open ,
83
+ .release = sort_release ,
84
84
.owner = THIS_MODULE ,
85
85
};
86
86
87
- static int __init ksort_init (void )
87
+ static int __init sort_init (void )
88
88
{
89
89
struct device * device ;
90
90
@@ -107,7 +107,7 @@ static int __init ksort_init(void)
107
107
if (cdev_add (& cdev , dev , 1 ) < 0 )
108
108
goto error_device_destroy ;
109
109
110
- workqueue = alloc_workqueue ("ksortq " , 0 , WQ_MAX_ACTIVE );
110
+ workqueue = alloc_workqueue ("sortq " , 0 , WQ_MAX_ACTIVE );
111
111
if (!workqueue )
112
112
goto error_cdev_del ;
113
113
@@ -125,7 +125,7 @@ static int __init ksort_init(void)
125
125
return -1 ;
126
126
}
127
127
128
- static void __exit ksort_exit (void )
128
+ static void __exit sort_exit (void )
129
129
{
130
130
/* Given that drain_workqueue will be executed, there is no need for an
131
131
* explicit flush action.
@@ -140,5 +140,5 @@ static void __exit ksort_exit(void)
140
140
printk (KERN_INFO DEVICE_NAME ": unloaded\n" );
141
141
}
142
142
143
- module_init (ksort_init );
144
- module_exit (ksort_exit );
143
+ module_init (sort_init );
144
+ module_exit (sort_exit );
0 commit comments