Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / iseries / viopath.c
index 84e7ee2c086f59f21bec9a99b0ce368b07b11676..354b8dd2a2c1e2ccdf515e164c26fcf571c232fe 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/wait.h>
 #include <linux/seq_file.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/prom.h>
+#include <asm/firmware.h>
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_lp_config.h>
@@ -154,7 +154,7 @@ static int proc_viopath_show(struct seq_file *m, void *v)
        node = of_find_node_by_path("/");
        sysid = NULL;
        if (node != NULL)
-               sysid = get_property(node, "system-id", NULL);
+               sysid = of_get_property(node, "system-id", NULL);
 
        if (sysid == NULL)
                seq_printf(m, "SRLNBR=<UNKNOWN>\n");
@@ -172,7 +172,7 @@ static int proc_viopath_open(struct inode *inode, struct file *file)
        return single_open(file, proc_viopath_show, NULL);
 }
 
-static struct file_operations proc_viopath_operations = {
+static const struct file_operations proc_viopath_operations = {
        .open           = proc_viopath_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -183,6 +183,9 @@ static int __init vio_proc_init(void)
 {
        struct proc_dir_entry *e;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return 0;
+
        e = create_proc_entry("iSeries/config", 0, NULL);
        if (e)
                e->proc_fops = &proc_viopath_operations;