summaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-22 14:27:05 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-22 14:27:05 -0400
commit057ace5e79da9ebf2aa82833cfea825533ac06fb (patch)
treef27ed6cbd9a185041862471ef421e6415e099344 /include/linux/ata.h
parentcf482935c6abe5245e481213c6e6df808c976f56 (diff)
downloadkernel-crypto-057ace5e79da9ebf2aa82833cfea825533ac06fb.tar.gz
kernel-crypto-057ace5e79da9ebf2aa82833cfea825533ac06fb.tar.xz
kernel-crypto-057ace5e79da9ebf2aa82833cfea825533ac06fb.zip
libata: const-ification bombing run
Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 33276d1d05d..d2873b732bb 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -261,7 +261,7 @@ struct ata_taskfile {
((u64) (id)[(n) + 1] << 16) | \
((u64) (id)[(n) + 0]) )
-static inline int ata_id_current_chs_valid(u16 *id)
+static inline int ata_id_current_chs_valid(const u16 *id)
{
/* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
has not been issued to the device then the values of
@@ -273,7 +273,7 @@ static inline int ata_id_current_chs_valid(u16 *id)
id[56]; /* sectors in current translation */
}
-static inline int atapi_cdb_len(u16 *dev_id)
+static inline int atapi_cdb_len(const u16 *dev_id)
{
u16 tmp = dev_id[0] & 0x3;
switch (tmp) {
@@ -283,7 +283,7 @@ static inline int atapi_cdb_len(u16 *dev_id)
}
}
-static inline int is_atapi_taskfile(struct ata_taskfile *tf)
+static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
{
return (tf->protocol == ATA_PROT_ATAPI) ||
(tf->protocol == ATA_PROT_ATAPI_NODATA) ||