diff options
Diffstat (limited to 'drivers')
-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) | |||
703 | { | 703 | { |
704 | struct packet_command cgc; | 704 | struct packet_command cgc; |
705 | char buffer[16]; | 705 | char buffer[16]; |
706 | __u16 *feature_code; | 706 | __be16 *feature_code; |
707 | int ret; | 707 | int ret; |
708 | 708 | ||
709 | init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ); | 709 | 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) | |||
716 | if ((ret = cdi->ops->generic_packet(cdi, &cgc))) | 716 | if ((ret = cdi->ops->generic_packet(cdi, &cgc))) |
717 | return ret; | 717 | return ret; |
718 | 718 | ||
719 | feature_code = (__u16 *) &buffer[sizeof(struct feature_header)]; | 719 | feature_code = (__be16 *) &buffer[sizeof(struct feature_header)]; |
720 | if (be16_to_cpu(*feature_code) == CDF_HWDM) | 720 | if (be16_to_cpu(*feature_code) == CDF_HWDM) |
721 | return 0; | 721 | return 0; |
722 | 722 | ||
@@ -2963,7 +2963,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | |||
2963 | how much data is available for transfer. buffer[1] is | 2963 | how much data is available for transfer. buffer[1] is |
2964 | unfortunately ambigious and the only reliable way seem | 2964 | unfortunately ambigious and the only reliable way seem |
2965 | to be to simply skip over the block descriptor... */ | 2965 | to be to simply skip over the block descriptor... */ |
2966 | offset = 8 + be16_to_cpu(*(unsigned short *)(buffer+6)); | 2966 | offset = 8 + be16_to_cpu(*(__be16 *)(buffer+6)); |
2967 | 2967 | ||
2968 | if (offset + 16 > sizeof(buffer)) | 2968 | if (offset + 16 > sizeof(buffer)) |
2969 | return -E2BIG; | 2969 | return -E2BIG; |