forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kerne…
…l/git/viro/vfs Pull procfs updates from Al Viro: "Christoph's proc_create_... cleanups series" * 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits) xfs, proc: hide unused xfs procfs helpers isdn/gigaset: add back gigaset_procinfo assignment proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields tty: replace ->proc_fops with ->proc_show ide: replace ->proc_fops with ->proc_show ide: remove ide_driver_proc_write isdn: replace ->proc_fops with ->proc_show atm: switch to proc_create_seq_private atm: simplify procfs code bluetooth: switch to proc_create_seq_data netfilter/x_tables: switch to proc_create_seq_private netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data neigh: switch to proc_create_seq_data hostap: switch to proc_create_{seq,single}_data bonding: switch to proc_create_seq_data rtc/proc: switch to proc_create_single_data drbd: switch to proc_create_single resource: switch to proc_create_seq_data staging/rtl8192u: simplify procfs code jfs: simplify procfs code ...
- Loading branch information
Showing
266 changed files
with
1,229 additions
and
6,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,6 @@ MODULE_AUTHOR("Jesse Barnes <[email protected]>"); | |
MODULE_DESCRIPTION("/proc interface to IA-64 SAL features"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
static const struct file_operations proc_salinfo_fops; | ||
|
||
typedef struct { | ||
const char *name; /* name of the proc entry */ | ||
unsigned long feature; /* feature bit */ | ||
|
@@ -578,6 +576,17 @@ static int salinfo_cpu_pre_down(unsigned int cpu) | |
return 0; | ||
} | ||
|
||
/* | ||
* 'data' contains an integer that corresponds to the feature we're | ||
* testing | ||
*/ | ||
static int proc_salinfo_show(struct seq_file *m, void *v) | ||
{ | ||
unsigned long data = (unsigned long)v; | ||
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n"); | ||
return 0; | ||
} | ||
|
||
static int __init | ||
salinfo_init(void) | ||
{ | ||
|
@@ -593,9 +602,9 @@ salinfo_init(void) | |
|
||
for (i=0; i < NR_SALINFO_ENTRIES; i++) { | ||
/* pass the feature bit in question as misc data */ | ||
*sdir++ = proc_create_data(salinfo_entries[i].name, 0, salinfo_dir, | ||
&proc_salinfo_fops, | ||
(void *)salinfo_entries[i].feature); | ||
*sdir++ = proc_create_single_data(salinfo_entries[i].name, 0, | ||
salinfo_dir, proc_salinfo_show, | ||
(void *)salinfo_entries[i].feature); | ||
} | ||
|
||
for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) { | ||
|
@@ -633,27 +642,4 @@ salinfo_init(void) | |
return 0; | ||
} | ||
|
||
/* | ||
* 'data' contains an integer that corresponds to the feature we're | ||
* testing | ||
*/ | ||
static int proc_salinfo_show(struct seq_file *m, void *v) | ||
{ | ||
unsigned long data = (unsigned long)v; | ||
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n"); | ||
return 0; | ||
} | ||
|
||
static int proc_salinfo_open(struct inode *inode, struct file *file) | ||
{ | ||
return single_open(file, proc_salinfo_show, PDE_DATA(inode)); | ||
} | ||
|
||
static const struct file_operations proc_salinfo_fops = { | ||
.open = proc_salinfo_open, | ||
.read = seq_read, | ||
.llseek = seq_lseek, | ||
.release = single_release, | ||
}; | ||
|
||
module_init(salinfo_init); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.