diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-06 13:07:29 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-06 13:07:29 -0600 |
commit | 1f978ce7a5066fbac3ec0f10095fc5946f457ab8 (patch) | |
tree | 4e6b4b7215cd44ecff710b710f9f8b914aba6516 /nuttx/drivers/usbdev/usbmsc_scsi.c | |
parent | 479fbfb6c4c17ae3520a4403fe68ea5939a74546 (diff) | |
download | px4-nuttx-1f978ce7a5066fbac3ec0f10095fc5946f457ab8.tar.gz px4-nuttx-1f978ce7a5066fbac3ec0f10095fc5946f457ab8.tar.bz2 px4-nuttx-1f978ce7a5066fbac3ec0f10095fc5946f457ab8.zip |
SAMA5D3x-EK: Add support for USB MSC device on AT25 serial flash
Diffstat (limited to 'nuttx/drivers/usbdev/usbmsc_scsi.c')
-rw-r--r-- | nuttx/drivers/usbdev/usbmsc_scsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nuttx/drivers/usbdev/usbmsc_scsi.c b/nuttx/drivers/usbdev/usbmsc_scsi.c index ff551871c..fbeb0f192 100644 --- a/nuttx/drivers/usbdev/usbmsc_scsi.c +++ b/nuttx/drivers/usbdev/usbmsc_scsi.c @@ -784,6 +784,8 @@ static inline int usbmsc_cmdstartstopunit(FAR struct usbmsc_dev_s *priv) if (ret == OK) { #ifndef CONFIG_USBMSC_REMOVABLE + FAR struct usbmsc_lun_s *lun = priv->lun; + /* This command is not valid if the media is not removable */ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_NOTREMOVABLE), 0); @@ -806,8 +808,8 @@ static inline int usbmsc_cmdpreventmediumremoval(FAR struct usbmsc_dev_s *priv) { #ifdef CONFIG_USBMSC_REMOVABLE FAR struct scsicmd_preventmediumremoval_s *pmr = (FAR struct scsicmd_preventmediumremoval_s *)priv->cdb; - FAR struct usbmsc_lun_s *lun = priv->lun; #endif + FAR struct usbmsc_lun_s *lun = priv->lun; int ret; priv->u.alloclen = 0; |