iodev, usb_dwc3: cosmetic fixes

Signed-off-by: Pip Cet <pipcet@gmail.com>
This commit is contained in:
Pip Cet 2021-08-24 12:27:52 +00:00 committed by Hector Martin
parent eb466796d8
commit 6a92a3e71a
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ size_t con_rp[IODEV_MAX];
ssize_t iodev_can_read(iodev_id_t id)
{
if (!iodevs[id]->ops->can_read)
return false;
return 0;
return iodevs[id]->ops->can_read(iodevs[id]->opaque);
}

View file

@ -1368,11 +1368,11 @@ size_t usb_dwc3_read(dwc3_dev_t *dev, cdc_acm_pipe_id_t pipe, void *buf, size_t
ssize_t usb_dwc3_can_read(dwc3_dev_t *dev, cdc_acm_pipe_id_t pipe)
{
if (!dev || !dev->ready)
return false;
return 0;
ringbuffer_t *host2device = dev->pipe[pipe].host2device;
if (!host2device)
return false;
return 0;
return ringbuffer_get_used(host2device);
}