tcd->class_device = class_simple_device_add( 
tcd->class_device = class_device_create( 
struct tape_class_device *register_tape_dev(	struct device *		device,	dev_t			dev,	struct file_operations *fops,	char *			device_name,	char *			mode_name){	struct tape_class_device *	tcd;	int		rc;	char *		s;	tcd = kmalloc(sizeof(struct tape_class_device), GFP_KERNEL);	if (!tcd)		return ERR_PTR(-ENOMEM);	memset(tcd, 0, sizeof(struct tape_class_device));	strncpy(tcd->device_name, device_name, TAPECLASS_NAME_LEN);	for (s = strchr(tcd->device_name, '/'); s; s = strchr(s, '/'))		*s = '!';	strncpy(tcd->mode_name, mode_name, TAPECLASS_NAME_LEN);	for (s = strchr(tcd->mode_name, '/'); s; s = strchr(s, '/'))		*s = '!';	tcd->char_device = cdev_alloc();	if (!tcd->char_device) {		rc = -ENOMEM;		goto fail_with_tcd;	}	tcd->char_device->owner = fops->owner;	tcd->char_device->ops   = fops;	tcd->char_device->dev   = dev;	rc = cdev_add(tcd->char_device, tcd->char_device->dev, 1);	if (rc)		goto fail_with_cdev;	tcd->class_device = class_simple_device_add(				tape_class,				tcd->char_device->dev,				device,				"%s", tcd->device_name			);	sysfs_create_link(		&device->kobj,		&tcd->class_device->kobj,		tcd->mode_name	);	return tcd;fail_with_cdev:	cdev_del(tcd->char_device);fail_with_tcd:	kfree(tcd);	return ERR_PTR(rc);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/56b2293595b2eb52cc2aa2baf92c6cfa8265f9d5/tape_class.c/buggy/drivers/s390/char/tape_class.c