mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
lparcfg: don't bother saving pointer to proc_dir_entry
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
6ea1511ec4
commit
b177a29251
@ -41,8 +41,6 @@
|
|||||||
|
|
||||||
/* #define LPARCFG_DEBUG */
|
/* #define LPARCFG_DEBUG */
|
||||||
|
|
||||||
static struct proc_dir_entry *proc_ppc64_lparcfg;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Track sum of all purrs across all processors. This is used to further
|
* Track sum of all purrs across all processors. This is used to further
|
||||||
* calculate usage values by different applications
|
* calculate usage values by different applications
|
||||||
@ -688,27 +686,22 @@ static const struct file_operations lparcfg_fops = {
|
|||||||
|
|
||||||
static int __init lparcfg_init(void)
|
static int __init lparcfg_init(void)
|
||||||
{
|
{
|
||||||
struct proc_dir_entry *ent;
|
|
||||||
umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
|
umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
|
||||||
|
|
||||||
/* Allow writing if we have FW_FEATURE_SPLPAR */
|
/* Allow writing if we have FW_FEATURE_SPLPAR */
|
||||||
if (firmware_has_feature(FW_FEATURE_SPLPAR))
|
if (firmware_has_feature(FW_FEATURE_SPLPAR))
|
||||||
mode |= S_IWUSR;
|
mode |= S_IWUSR;
|
||||||
|
|
||||||
ent = proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops);
|
if (!proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops)) {
|
||||||
if (!ent) {
|
|
||||||
printk(KERN_ERR "Failed to create powerpc/lparcfg\n");
|
printk(KERN_ERR "Failed to create powerpc/lparcfg\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
proc_ppc64_lparcfg = ent;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit lparcfg_cleanup(void)
|
static void __exit lparcfg_cleanup(void)
|
||||||
{
|
{
|
||||||
if (proc_ppc64_lparcfg)
|
remove_proc_subtree("powerpc/lparcfg", NULL);
|
||||||
remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(lparcfg_init);
|
module_init(lparcfg_init);
|
||||||
|
Loading…
Reference in New Issue
Block a user