[patch 1/3] SCSI: osst: remove gendisk from private data struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since gendisk is now part of scsi_device, don't store this struct
in private data struct

Signed-off-by:  Kristen Carlson Accardi <[email protected]>
Index: 2.6-git/drivers/scsi/osst.c
===================================================================
--- 2.6-git.orig/drivers/scsi/osst.c
+++ 2.6-git/drivers/scsi/osst.c
@@ -191,7 +191,7 @@ static int osst_write_error_recovery(str
 
 static inline char *tape_name(struct osst_tape *tape)
 {
-	return tape->drive->disk_name;
+	return tape->device->disk->disk_name;
 }
 
 /* Routines that handle the interaction with mid-layer SCSI routines */
@@ -5803,7 +5803,6 @@ static int osst_probe(struct device *dev
 	drive->private_data = &tpnt->driver;
 	sprintf(drive->disk_name, "osst%d", dev_num);
 	tpnt->driver = &osst_template;
-	tpnt->drive = drive;
 	tpnt->in_use = 0;
 	tpnt->capacity = 0xfffff;
 	tpnt->dirty = 0;
@@ -5885,6 +5884,8 @@ static int osst_probe(struct device *dev
 			goto out_free_sysfs1;
 	}
 
+	SDp->disk = drive;
+
 	sdev_printk(KERN_INFO, SDp,
 		"osst :I: Attached OnStream %.5s tape as %s\n",
 		SDp->model, tape_name(tpnt));
@@ -5915,7 +5916,7 @@ static int osst_remove(struct device *de
 			osst_sysfs_destroy(MKDEV(OSST_MAJOR, i));
 			osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128));
 			tpnt->device = NULL;
-			put_disk(tpnt->drive);
+			put_disk(tpnt->device->disk);
 			os_scsi_tapes[i] = NULL;
 			osst_nr_dev--;
 			write_unlock(&os_scsi_tapes_lock);
@@ -5988,7 +5989,7 @@ static void __exit exit_osst (void)
 				normalize_buffer(STp->buffer);
 				kfree(STp->buffer);
 			}
-			put_disk(STp->drive);
+			put_disk(STp->device->disk);
 			kfree(STp);
 		}
 		kfree(os_scsi_tapes);
Index: 2.6-git/drivers/scsi/osst.h
===================================================================
--- 2.6-git.orig/drivers/scsi/osst.h
+++ 2.6-git/drivers/scsi/osst.h
@@ -623,7 +623,6 @@ struct osst_tape {
   unsigned char last_cmnd[6];
   unsigned char last_sense[16];
 #endif
-  struct gendisk *drive;
 } ;
 
 /* scsi tape command */

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux