Remove some unnecessary tests

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3235 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-01-09 02:42:02 +00:00
parent d04467620b
commit 08508f1a27
2 changed files with 11 additions and 51 deletions
+1 -1
View File
@@ -802,7 +802,7 @@ static int lpc17_usbinterrupt(int irq, FAR void *context)
else if (priv->connected) else if (priv->connected)
{ {
/* Yes.. disable interrupts and disconnect the device */ /* Yes.. disconnect the device */
ullvdbg("Disconnected\n"); ullvdbg("Disconnected\n");
priv->connected = false; priv->connected = false;
-40
View File
@@ -660,10 +660,6 @@ static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv)
FAR struct usb_ctrlreq_s *req = (FAR struct usb_ctrlreq_s *)priv->tdbuffer; FAR struct usb_ctrlreq_s *req = (FAR struct usb_ctrlreq_s *)priv->tdbuffer;
DEBUGASSERT(priv && priv->tdbuffer); DEBUGASSERT(priv && priv->tdbuffer);
/* Make sure that the device is still connected. */
if (!priv->disconnected)
{
/* Request maximum logical unit number. NOTE: On an IN transaction, The /* Request maximum logical unit number. NOTE: On an IN transaction, The
* req and buffer pointers passed to DRVR_CTRLIN may refer to the same * req and buffer pointers passed to DRVR_CTRLIN may refer to the same
* allocated memory. * allocated memory.
@@ -677,23 +673,11 @@ static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv)
return DRVR_CTRLIN(priv->drvr, req, priv->tdbuffer); return DRVR_CTRLIN(priv->drvr, req, priv->tdbuffer);
} }
udbg("ERROR: No longer connected\n");
return -ENODEV;
}
static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv) static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv)
{ {
FAR struct usbstrg_cbw_s *cbw; FAR struct usbstrg_cbw_s *cbw;
int result; int result;
/* Make sure that the device is still connected */
if (priv->disconnected)
{
udbg("ERROR: No longer connected\n");
return -ENODEV;
}
/* Initialize a CBW (re-using the allocated transfer buffer) */ /* Initialize a CBW (re-using the allocated transfer buffer) */
cbw = usbhost_cbwalloc(priv); cbw = usbhost_cbwalloc(priv);
@@ -727,14 +711,6 @@ static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv)
FAR struct usbstrg_cbw_s *cbw; FAR struct usbstrg_cbw_s *cbw;
int result; int result;
/* Make sure that the device is still connected */
if (priv->disconnected)
{
udbg("ERROR: No longer connected\n");
return -ENODEV;
}
/* Initialize a CBW (re-using the allocated transfer buffer) */ /* Initialize a CBW (re-using the allocated transfer buffer) */
cbw = usbhost_cbwalloc(priv); cbw = usbhost_cbwalloc(priv);
@@ -777,14 +753,6 @@ static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv)
FAR struct scsiresp_readcapacity10_s *resp; FAR struct scsiresp_readcapacity10_s *resp;
int result; int result;
/* Make sure that the device is still connected */
if (priv->disconnected)
{
udbg("ERROR: No longer connected\n");
return -ENODEV;
}
/* Initialize a CBW (re-using the allocated transfer buffer) */ /* Initialize a CBW (re-using the allocated transfer buffer) */
cbw = usbhost_cbwalloc(priv); cbw = usbhost_cbwalloc(priv);
@@ -833,14 +801,6 @@ static inline int usbhost_inquiry(FAR struct usbhost_state_s *priv)
FAR struct scsiresp_inquiry_s *resp; FAR struct scsiresp_inquiry_s *resp;
int result; int result;
/* Make sure that the device is still connected */
if (priv->disconnected)
{
udbg("ERROR: No longer connected\n");
return -ENODEV;
}
/* Initialize a CBW (re-using the allocated transfer buffer) */ /* Initialize a CBW (re-using the allocated transfer buffer) */
cbw = usbhost_cbwalloc(priv); cbw = usbhost_cbwalloc(priv);