浏览代码

[PATCH] Altix snsc: duplicate kobject fix

from: Greg Howard <ghoward@sgi.com>

Fix Altix system controller (snsc) device names to include the slot number
of the blade whose associated system controller is the target of the device
interface.  Including the slot number avoids a problem we're currently
having where slots within the same enclosure are attempting to create
multiple kobjects with identical names.

Signed-off-by: Greg Howard <ghoward@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
akpm@osdl.org 19 年之前
父节点
当前提交
8c4335a87c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/char/snsc.c

+ 2 - 1
drivers/char/snsc.c

@@ -390,7 +390,8 @@ scdrv_init(void)
 			format_module_id(devnamep, geo_module(geoid),
 			format_module_id(devnamep, geo_module(geoid),
 					 MODULE_FORMAT_BRIEF);
 					 MODULE_FORMAT_BRIEF);
 			devnamep = devname + strlen(devname);
 			devnamep = devname + strlen(devname);
-			sprintf(devnamep, "#%d", geo_slab(geoid));
+			sprintf(devnamep, "^%d#%d", geo_slot(geoid),
+				geo_slab(geoid));
 
 
 			/* allocate sysctl device data */
 			/* allocate sysctl device data */
 			scd = kzalloc(sizeof (struct sysctl_data_s),
 			scd = kzalloc(sizeof (struct sysctl_data_s),