projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branches 'spi/fix/ep93xx', 'spi/fix/rockchip', 'spi/fix/sunxi...
[cascardo/linux.git]
/
drivers
/
scsi
/
sd.h
diff --git
a/drivers/scsi/sd.h
b/drivers/scsi/sd.h
index
654630b
..
765a6f1
100644
(file)
--- a/
drivers/scsi/sd.h
+++ b/
drivers/scsi/sd.h
@@
-151,6
+151,11
@@
static inline sector_t logical_to_sectors(struct scsi_device *sdev, sector_t blo
return blocks << (ilog2(sdev->sector_size) - 9);
}
return blocks << (ilog2(sdev->sector_size) - 9);
}
+static inline unsigned int logical_to_bytes(struct scsi_device *sdev, sector_t blocks)
+{
+ return blocks * sdev->sector_size;
+}
+
/*
* A DIF-capable target device can be formatted with different
* protection schemes. Currently 0 through 3 are defined:
/*
* A DIF-capable target device can be formatted with different
* protection schemes. Currently 0 through 3 are defined: