Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fb729f5 authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: ub 01 rename



Rename misleading UB_MINORS_PER_MAJOR into UB_PARTS_PER_LUN.

Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2c26c9e6
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@
/*
/*
 */
 */


#define UB_MINORS_PER_MAJOR	8
#define UB_PARTS_PER_LUN      8


#define UB_MAX_CDB_SIZE      16		/* Corresponds to Bulk */
#define UB_MAX_CDB_SIZE      16		/* Corresponds to Bulk */


@@ -2473,14 +2473,14 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum)
	ub_revalidate(sc, lun);
	ub_revalidate(sc, lun);


	rc = -ENOMEM;
	rc = -ENOMEM;
	if ((disk = alloc_disk(UB_MINORS_PER_MAJOR)) == NULL)
	if ((disk = alloc_disk(UB_PARTS_PER_LUN)) == NULL)
		goto err_diskalloc;
		goto err_diskalloc;


	lun->disk = disk;
	lun->disk = disk;
	sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');
	sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');
	sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');
	sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');
	disk->major = UB_MAJOR;
	disk->major = UB_MAJOR;
	disk->first_minor = lun->id * UB_MINORS_PER_MAJOR;
	disk->first_minor = lun->id * UB_PARTS_PER_LUN;
	disk->fops = &ub_bd_fops;
	disk->fops = &ub_bd_fops;
	disk->private_data = lun;
	disk->private_data = lun;
	disk->driverfs_dev = &sc->intf->dev;
	disk->driverfs_dev = &sc->intf->dev;