All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: card: modify mmc_getgeo function
@ 2011-09-20 11:08 Girish K S
  2011-09-21 18:52 ` Chris Ball
  0 siblings, 1 reply; 12+ messages in thread
From: Girish K S @ 2011-09-20 11:08 UTC (permalink / raw)
  To: linux-mmc; +Cc: cjb, kgene.kim, patches, linux-samsung-soc, Girish K S

In the earlier code the cylinder, sector and head are assigned
independently. Current patch generates the cylinder number
with the values of sector and head.
This patch only makes they cylinder value to be dependent on
the sector and head.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
---
 drivers/mmc/card/block.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 1ff5486..bebb13b 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -226,9 +226,10 @@ static int mmc_blk_release(struct gendisk *disk, fmode_t mode)
 static int
 mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 {
-	geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16);
 	geo->heads = 4;
 	geo->sectors = 16;
+	geo->cylinders = get_capacity(bdev->bd_disk) /
+		(geo->heads * geo->sectors);
 	return 0;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-09-26 13:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 11:08 [PATCH] mmc: card: modify mmc_getgeo function Girish K S
2011-09-21 18:52 ` Chris Ball
2011-09-26  8:28   ` Uwe Kleine-König
2011-09-26  8:28     ` Uwe Kleine-König
2011-09-26 12:41     ` Chris Ball
2011-09-26 12:41       ` Chris Ball
2011-09-26 13:09       ` Russell King - ARM Linux
2011-09-26 13:09         ` Russell King - ARM Linux
2011-09-26 13:13       ` Uwe Kleine-König
2011-09-26 13:13         ` Uwe Kleine-König
2011-09-26 13:19         ` Russell King - ARM Linux
2011-09-26 13:19           ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.