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;
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;