summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/nubus/proc.c6
-rw-r--r--include/linux/nubus.h5
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/nubus/proc.c b/drivers/nubus/proc.c
index fc20dbcd3b9a..91211192f36f 100644
--- a/drivers/nubus/proc.c
+++ b/drivers/nubus/proc.c
@@ -134,9 +134,13 @@ int nubus_proc_attach_device(struct nubus_dev *dev)
return -1;
}
+ if (dev->board->procdir)
+ return 0;
+
/* Create a directory */
snprintf(name, sizeof(name), "%x", dev->board->slot);
- e = dev->procdir = proc_mkdir(name, proc_bus_nubus_dir);
+ e = proc_mkdir(name, proc_bus_nubus_dir);
+ dev->board->procdir = e;
if (!e)
return -ENOMEM;
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index e525669f1991..2245430e1357 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -53,13 +53,14 @@ struct nubus_board {
unsigned char rev;
unsigned char format;
unsigned char lanes;
+
+ /* Directory entry in /proc/bus/nubus */
+ struct proc_dir_entry *procdir;
};
struct nubus_dev {
/* Next link in device list */
struct nubus_dev* next;
- /* Directory entry in /proc/bus/nubus */
- struct proc_dir_entry* procdir;
/* The functional resource ID of this device */
unsigned char resid;