diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2005-12-01 23:10:40 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 01:15:33 +0200 |
commit | 56052d525a05ba9e53d4f11be2d5deee64924514 (patch) | |
tree | 798503b2208b232fe1525ac3beea173643b72b6d /drivers/cdrom | |
parent | [PATCH] use %p for pointers (diff) | |
download | linux-56052d525a05ba9e53d4f11be2d5deee64924514.tar.xz linux-56052d525a05ba9e53d4f11be2d5deee64924514.zip |
[PATCH] cdrom: add endianness annotations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/cdrom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 2a0c50d84fc5..7ea0f48f8fa6 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -703,7 +703,7 @@ static int cdrom_has_defect_mgt(struct cdrom_device_info *cdi) { struct packet_command cgc; char buffer[16]; - __u16 *feature_code; + __be16 *feature_code; int ret; init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ); @@ -716,7 +716,7 @@ static int cdrom_has_defect_mgt(struct cdrom_device_info *cdi) if ((ret = cdi->ops->generic_packet(cdi, &cgc))) return ret; - feature_code = (__u16 *) &buffer[sizeof(struct feature_header)]; + feature_code = (__be16 *) &buffer[sizeof(struct feature_header)]; if (be16_to_cpu(*feature_code) == CDF_HWDM) return 0; @@ -2963,7 +2963,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, how much data is available for transfer. buffer[1] is unfortunately ambigious and the only reliable way seem to be to simply skip over the block descriptor... */ - offset = 8 + be16_to_cpu(*(unsigned short *)(buffer+6)); + offset = 8 + be16_to_cpu(*(__be16 *)(buffer+6)); if (offset + 16 > sizeof(buffer)) return -E2BIG; |