Commit 06aa05b3 authored by Russ Anderson's avatar Russ Anderson Committed by Ingo Molnar

x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems

/sys/firmware/sgi_uv should only be created on uv systems.
Signed-off-by: default avatarRuss Anderson <rja@sgi.com>
LKML-Reference: <20090403222423.GA28546@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6a891a24
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <asm/uv/bios.h> #include <asm/uv/bios.h>
#include <asm/uv/uv.h>
struct kobject *sgi_uv_kobj; struct kobject *sgi_uv_kobj;
...@@ -47,6 +48,9 @@ static int __init sgi_uv_sysfs_init(void) ...@@ -47,6 +48,9 @@ static int __init sgi_uv_sysfs_init(void)
{ {
unsigned long ret; unsigned long ret;
if (!is_uv_system())
return -ENODEV;
if (!sgi_uv_kobj) if (!sgi_uv_kobj)
sgi_uv_kobj = kobject_create_and_add("sgi_uv", firmware_kobj); sgi_uv_kobj = kobject_create_and_add("sgi_uv", firmware_kobj);
if (!sgi_uv_kobj) { if (!sgi_uv_kobj) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment