mirror of
https://github.com/gnab/rtl8812au
synced 2024-11-26 23:25:28 +00:00
Use proc_create_data to properly pass along data.
This commit is contained in:
parent
c84bc550e8
commit
558835015b
@ -323,12 +323,10 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
|
||||
read_proc_t *read_proc, void * data)
|
||||
{
|
||||
struct file_operations fops = {
|
||||
owner: THIS_MODULE,
|
||||
read: read_proc
|
||||
};
|
||||
struct proc_dir_entry *res = proc_create(name, mode, base, &fops);
|
||||
//if (res) {
|
||||
// res->data = data;
|
||||
//}
|
||||
struct proc_dir_entry *res = proc_create_data(name, mode, base, &fops, data);
|
||||
return res;
|
||||
}
|
||||
typedef ssize_t (*write_proc_t) (struct file *, const char __user *, ssize_t, loff_t *);
|
||||
@ -337,13 +335,11 @@ static inline struct proc_dir_entry *create_proc_read_write_entry(const char *na
|
||||
read_proc_t *read_proc, void * data, write_proc_t *write_proc)
|
||||
{
|
||||
struct file_operations fops = {
|
||||
owner: THIS_MODULE,
|
||||
read: read_proc,
|
||||
write: write_proc
|
||||
};
|
||||
struct proc_dir_entry *res = proc_create(name, mode, base, &fops);
|
||||
//if (res) {
|
||||
// res->data = data;
|
||||
//}
|
||||
struct proc_dir_entry *res = proc_create_data(name, mode, base, &fops, data);
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user