mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-27 08:50:17 +00:00
iodev, usb_dwc3: cosmetic fixes
Signed-off-by: Pip Cet <pipcet@gmail.com>
This commit is contained in:
parent
eb466796d8
commit
6a92a3e71a
2 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ size_t con_rp[IODEV_MAX];
|
||||||
ssize_t iodev_can_read(iodev_id_t id)
|
ssize_t iodev_can_read(iodev_id_t id)
|
||||||
{
|
{
|
||||||
if (!iodevs[id]->ops->can_read)
|
if (!iodevs[id]->ops->can_read)
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
return iodevs[id]->ops->can_read(iodevs[id]->opaque);
|
return iodevs[id]->ops->can_read(iodevs[id]->opaque);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
ssize_t usb_dwc3_can_read(dwc3_dev_t *dev, cdc_acm_pipe_id_t pipe)
|
||||||
{
|
{
|
||||||
if (!dev || !dev->ready)
|
if (!dev || !dev->ready)
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
ringbuffer_t *host2device = dev->pipe[pipe].host2device;
|
ringbuffer_t *host2device = dev->pipe[pipe].host2device;
|
||||||
if (!host2device)
|
if (!host2device)
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
return ringbuffer_get_used(host2device);
|
return ringbuffer_get_used(host2device);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue