summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-04-15 09:29:22 +0100
committerAndy Green <andy.green@linaro.org>2011-04-15 09:29:22 +0100
commitcaa70ccf8cc719acb0540b558b4e075796778db8 (patch)
treee8173307b04eca62168415be04e7800bdf011f80 /include/scsi/scsi_device.h
parent56d667f87e81d15d43f264007322f1179ce1722e (diff)
parent3ec10cd8b526c6b10170c2649002672ee2019e73 (diff)
Merge branch 'linux-linaro-2.6.38-master' into for-ubuntuu2
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 85867dcde33..bfd36ff14c9 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -461,7 +461,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev)
}
static inline int scsi_device_enclosure(struct scsi_device *sdev)
{
- return sdev->inquiry[6] & (1<<6);
+ return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1;
}
static inline int scsi_device_protection(struct scsi_device *sdev)