aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/lparcfg.c
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2007-12-04 11:03:49 -0500
committerPaul Mackerras <paulus@samba.org>2007-12-10 21:41:28 -0500
commit0d9dc4b473f7224cc1798c96d5dba84b69212163 (patch)
tree564498ea936d65b6072424b5a9ca67fc6117ca3c /arch/powerpc/kernel/lparcfg.c
parent24f1f17579e4cf2aeeb3a2813cc7757fa30d7a09 (diff)
[POWERPC] lparcfg: Remove useless buffer allocation
The 'data' member of proc_ppc64_lparcfg is unused, but the lparcfg module's init routine allocates 4K for it. Remove the code which allocates and frees this buffer. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r--arch/powerpc/kernel/lparcfg.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index ff781b2eddec..dcb89a88df46 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -41,7 +41,6 @@
41/* #define LPARCFG_DEBUG */ 41/* #define LPARCFG_DEBUG */
42 42
43static struct proc_dir_entry *proc_ppc64_lparcfg; 43static struct proc_dir_entry *proc_ppc64_lparcfg;
44#define LPARCFG_BUFF_SIZE 4096
45 44
46/* 45/*
47 * Track sum of all purrs across all processors. This is used to further 46 * Track sum of all purrs across all processors. This is used to further
@@ -595,13 +594,6 @@ int __init lparcfg_init(void)
595 ent = create_proc_entry("ppc64/lparcfg", mode, NULL); 594 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
596 if (ent) { 595 if (ent) {
597 ent->proc_fops = &lparcfg_fops; 596 ent->proc_fops = &lparcfg_fops;
598 ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
599 if (!ent->data) {
600 printk(KERN_ERR
601 "Failed to allocate buffer for lparcfg\n");
602 remove_proc_entry("lparcfg", ent->parent);
603 return -ENOMEM;
604 }
605 } else { 597 } else {
606 printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); 598 printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
607 return -EIO; 599 return -EIO;
@@ -613,10 +605,8 @@ int __init lparcfg_init(void)
613 605
614void __exit lparcfg_cleanup(void) 606void __exit lparcfg_cleanup(void)
615{ 607{
616 if (proc_ppc64_lparcfg) { 608 if (proc_ppc64_lparcfg)
617 kfree(proc_ppc64_lparcfg->data);
618 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent); 609 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
619 }
620} 610}
621 611
622module_init(lparcfg_init); 612module_init(lparcfg_init);