mddev->kobj.parent = kobject_get(&disk->kobj); mddev->kobj.k_name = NULL; snprintf(mddev->kobj.name, KOBJ_NAME_LEN, "%s", "md"); mddev->kobj.ktype = &md_ktype; kobject_register(&mddev->kobj); 
static struct kobject *md_probe(dev_t dev, int *part, void *data){	static DECLARE_MUTEX(disks_sem);	mddev_t *mddev = mddev_find(dev);	struct gendisk *disk;	int partitioned = (MAJOR(dev) != MD_MAJOR);	int shift = partitioned ? MdpMinorShift : 0;	int unit = MINOR(dev) >> shift;	if (!mddev)		return NULL;	down(&disks_sem);	if (mddev->gendisk) {		up(&disks_sem);		mddev_put(mddev);		return NULL;	}	disk = alloc_disk(1 << shift);	if (!disk) {		up(&disks_sem);		mddev_put(mddev);		return NULL;	}	disk->major = MAJOR(dev);	disk->first_minor = unit << shift;	if (partitioned) {		sprintf(disk->disk_name, "md_d%d", unit);		sprintf(disk->devfs_name, "md/d%d", unit);	} else {		sprintf(disk->disk_name, "md%d", unit);		sprintf(disk->devfs_name, "md/%d", unit);	}	disk->fops = &md_fops;	disk->private_data = mddev;	disk->queue = mddev->queue;	add_disk(disk);	mddev->gendisk = disk;	up(&disks_sem);	return NULL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/eae1701fbd264cfc7efbaf7cd4cd999760070e27/md.c/buggy/drivers/md/md.c