Subject: [PATCH] remove geometry support from ps3 storage driver

From: Olaf Hering <[email-masked]>
Date: Mon, 21 May 2007 14:53:11 +0200

The old ps3_storage driver did not support DOS geometry, so there is no
point to start adding code for it.

Signed-off-by: Olaf Hering <[email-masked]>

Index: linux-2.6.22-rc2/drivers/block/ps3disk.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/block/ps3disk.c
+++ linux-2.6.22-rc2/drivers/block/ps3disk.c
@@ -43,10 +43,6 @@
 
 #define KERNEL_SECTOR_SIZE	512
 
-// FIXME SCSI uses H=64, S=32. Can we still repartition disks partitioned using
-//       the old driver?
-#define PS3DISK_HEADS		255
-#define PS3DISK_SECTORS		63
 
 #define PS3DISK_NAME		"ps3d%c"
 
@@ -70,21 +66,11 @@ static int ps3disk_open(struct inode *in
 	return 0;
 }
 
-static int ps3disk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
-{
-	geo->heads = PS3DISK_HEADS;
-	geo->sectors = PS3DISK_SECTORS;
-	geo->cylinders = min(65535UL,
-			     get_capacity(bdev->bd_disk) /
-			     (PS3DISK_HEADS * PS3DISK_SECTORS));
-	return 0;
-}

 static struct block_device_operations ps3disk_fops = {
 	.owner		= THIS_MODULE,
 	.open		= ps3disk_open,
-	.getgeo		= ps3disk_getgeo,
 };
 
 static void ps3disk_scatter_gather(struct ps3_storage_device *dev,