Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[pandora-kernel.git] / arch / powerpc / kernel / lparcfg.c
index dcb89a8..827a572 100644 (file)
@@ -226,7 +226,7 @@ static void parse_system_parameter_string(struct seq_file *m)
        unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
        if (!local_buffer) {
                printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
-                      __FILE__, __FUNCTION__, __LINE__);
+                      __FILE__, __func__, __LINE__);
                return;
        }
 
@@ -243,14 +243,14 @@ static void parse_system_parameter_string(struct seq_file *m)
        if (call_status != 0) {
                printk(KERN_INFO
                       "%s %s Error calling get-system-parameter (0x%x)\n",
-                      __FILE__, __FUNCTION__, call_status);
+                      __FILE__, __func__, call_status);
        } else {
                int splpar_strlen;
                int idx, w_idx;
                char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
                if (!workbuffer) {
                        printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
-                              __FILE__, __FUNCTION__, __LINE__);
+                              __FILE__, __func__, __LINE__);
                        kfree(local_buffer);
                        return;
                }
@@ -484,10 +484,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
        current_weight = (resource >> 5 * 8) & 0xFF;
 
        pr_debug("%s: current_entitled = %lu, current_weight = %u\n",
-                __FUNCTION__, current_entitled, current_weight);
+                __func__, current_entitled, current_weight);
 
        pr_debug("%s: new_entitled = %lu, new_weight = %u\n",
-                __FUNCTION__, *new_entitled_ptr, *new_weight_ptr);
+                __func__, *new_entitled_ptr, *new_weight_ptr);
 
        retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
                                    *new_weight_ptr);
@@ -502,7 +502,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
                retval = -EINVAL;
        } else {
                printk(KERN_WARNING "%s: received unknown hv return code %ld",
-                      __FUNCTION__, retval);
+                      __func__, retval);
                retval = -EIO;
        }
 
@@ -573,7 +573,7 @@ static int lparcfg_open(struct inode *inode, struct file *file)
        return single_open(file, lparcfg_data, NULL);
 }
 
-const struct file_operations lparcfg_fops = {
+static const struct file_operations lparcfg_fops = {
        .owner          = THIS_MODULE,
        .read           = seq_read,
        .write          = lparcfg_write,
@@ -581,7 +581,7 @@ const struct file_operations lparcfg_fops = {
        .release        = single_release,
 };
 
-int __init lparcfg_init(void)
+static int __init lparcfg_init(void)
 {
        struct proc_dir_entry *ent;
        mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
@@ -591,10 +591,8 @@ int __init lparcfg_init(void)
                        !firmware_has_feature(FW_FEATURE_ISERIES))
                mode |= S_IWUSR;
 
-       ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
-       if (ent) {
-               ent->proc_fops = &lparcfg_fops;
-       } else {
+       ent = proc_create("ppc64/lparcfg", mode, NULL, &lparcfg_fops);
+       if (!ent) {
                printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
                return -EIO;
        }
@@ -603,7 +601,7 @@ int __init lparcfg_init(void)
        return 0;
 }
 
-void __exit lparcfg_cleanup(void)
+static void __exit lparcfg_cleanup(void)
 {
        if (proc_ppc64_lparcfg)
                remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);