Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / iseries / viopath.c
index 84e7ee2c086f59f21bec9a99b0ce368b07b11676..2ca2d8a9de97ac5bcf23148e62141df6978f069b 100644 (file)
@@ -42,6 +42,7 @@
 #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 +155,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 +173,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 +184,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;