diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-09-12 18:06:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:51:02 -0400 |
commit | 19c38de88a80913351fcacefdb461cc0b585fa87 (patch) | |
tree | 17d2978ce27861926a0d9a3eb49471b9b736f968 /drivers/md/md.c | |
parent | 5901d0145c6b9e791bacd049eea11c9db9a3006e (diff) |
kobjects: fix up improper use of the kobject name field
A number of different drivers incorrect access the kobject name field
directly. This is not correct as the name might not be in the array.
Use the proper accessor function instead.
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index e8f102ea9b03..acf1b81b47cb 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3076,8 +3076,7 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data) | |||
3076 | mddev->gendisk = disk; | 3076 | mddev->gendisk = disk; |
3077 | mutex_unlock(&disks_mutex); | 3077 | mutex_unlock(&disks_mutex); |
3078 | mddev->kobj.parent = &disk->kobj; | 3078 | mddev->kobj.parent = &disk->kobj; |
3079 | mddev->kobj.k_name = NULL; | 3079 | kobject_set_name(&mddev->kobj, "%s", "md"); |
3080 | snprintf(mddev->kobj.name, KOBJ_NAME_LEN, "%s", "md"); | ||
3081 | mddev->kobj.ktype = &md_ktype; | 3080 | mddev->kobj.ktype = &md_ktype; |
3082 | if (kobject_register(&mddev->kobj)) | 3081 | if (kobject_register(&mddev->kobj)) |
3083 | printk(KERN_WARNING "md: cannot register %s/md - name in use\n", | 3082 | printk(KERN_WARNING "md: cannot register %s/md - name in use\n", |