You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/23 10:03:27 UTC
[GitHub] [incubator-nuttx] chengkai15 opened a new pull request, #6901: serial/uart/h4: add ioctl interface
chengkai15 opened a new pull request, #6901:
URL: https://github.com/apache/incubator-nuttx/pull/6901
Signed-off-by: chengkai <ch...@xiaomi.com>
## Summary
add h4 ioctl interface
## Impact
## Testing
pass ci
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6901: serial/uart/h4: add ioctl interface
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6901:
URL: https://github.com/apache/incubator-nuttx/pull/6901#discussion_r952715360
##########
drivers/serial/uart_bth4.c:
##########
@@ -351,7 +351,15 @@ static ssize_t uart_bth4_write(FAR struct file *filep,
static int uart_bth4_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
{
- return OK;
+ FAR struct inode *inode = filep->f_inode;
+ FAR struct uart_bth4_s *dev = inode->i_private;
+
+ if (!dev->drv->ioctl)
+ {
+ return -ENOTTY;
+ }
+
+ return dev->drv->ioctl(dev->drv, cmd, arg);
Review Comment:
Optional
```suggestion
if (dev->drv->ioctl)
{
return dev->drv->ioctl(dev->drv, cmd, arg);
}
return -ENOTTY;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6901: serial/uart/h4: add ioctl interface
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6901:
URL: https://github.com/apache/incubator-nuttx/pull/6901
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org