diff options
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_scsi.c | 10 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_storage.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/drivers/usbdev/usbdev_scsi.c b/nuttx/drivers/usbdev/usbdev_scsi.c index 89fe7c11e..088dc3ec2 100644 --- a/nuttx/drivers/usbdev/usbdev_scsi.c +++ b/nuttx/drivers/usbdev/usbdev_scsi.c @@ -1665,12 +1665,12 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv) return -ENOMEM; } DEBUGASSERT(privreq->req && privreq->req->buf); - buf = (ubyte*)privreq->req->buf; + buf = privreq->req->buf; /* Assume that no errors will be encountered */ - priv->phaseerror = 0; - priv->shortpacket = 0; + priv->phaseerror = 0; + priv->shortpacket = 0; /* No data is buffered */ @@ -2018,7 +2018,7 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv) */ src = &priv->iobuffer[lun->sectorsize - priv->nsectbytes]; - dest = (ubyte*)&req->buf[priv->nreqbytes]; + dest = &req->buf[priv->nreqbytes]; nbytes = min(CONFIG_USBSTRG_BULKINREQLEN - priv->nreqbytes, priv->nsectbytes); @@ -2150,7 +2150,7 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv) { /* Copy the data received in the read request into the sector I/O buffer */ - src = (ubyte*)&req->buf[xfrd - priv->nreqbytes]; + src = &req->buf[xfrd - priv->nreqbytes]; dest = &priv->iobuffer[priv->nsectbytes]; nbytes = min(lun->sectorsize - priv->nsectbytes, priv->nreqbytes); diff --git a/nuttx/drivers/usbdev/usbdev_storage.c b/nuttx/drivers/usbdev/usbdev_storage.c index 7dcd911af..99651c15b 100644 --- a/nuttx/drivers/usbdev/usbdev_storage.c +++ b/nuttx/drivers/usbdev/usbdev_storage.c @@ -800,9 +800,9 @@ static int usbstrg_setup(FAR struct usbdev_s *dev, const struct usb_ctrlreq_s *c case USB_DESC_TYPE_CONFIG: { #ifdef CONFIG_USBDEV_DUALSPEED - ret = usbstrg_mkcfgdesc((ubyte*)ctrlreq->buf, dev->speed, len); + ret = usbstrg_mkcfgdesc(ctrlreq->buf, dev->speed, len); #else - ret = usbstrg_mkcfgdesc((ubyte*)ctrlreq->buf); + ret = usbstrg_mkcfgdesc(ctrlreq->buf); #endif } break; |