tty: serdev: convert to u8 and size_t
Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. This patch converts struct serdev_device_ops hooks and its instantiations. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Cc: Rob Herring <robh@kernel.org> Acked-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20231206073712.17776-24-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f2470d2bc4
commit
475fc6e2de
@@ -225,8 +225,7 @@ EXPORT_SYMBOL_GPL(serdev_device_write_wakeup);
|
||||
* Return: The number of bytes written (less than count if not enough room in
|
||||
* the write buffer), or a negative errno on errors.
|
||||
*/
|
||||
int serdev_device_write_buf(struct serdev_device *serdev,
|
||||
const unsigned char *buf, size_t count)
|
||||
int serdev_device_write_buf(struct serdev_device *serdev, const u8 *buf, size_t count)
|
||||
{
|
||||
struct serdev_controller *ctrl = serdev->ctrl;
|
||||
|
||||
@@ -259,13 +258,12 @@ EXPORT_SYMBOL_GPL(serdev_device_write_buf);
|
||||
* -ETIMEDOUT or -ERESTARTSYS if interrupted before any bytes were written, or
|
||||
* a negative errno on errors.
|
||||
*/
|
||||
int serdev_device_write(struct serdev_device *serdev,
|
||||
const unsigned char *buf, size_t count,
|
||||
long timeout)
|
||||
ssize_t serdev_device_write(struct serdev_device *serdev, const u8 *buf,
|
||||
size_t count, long timeout)
|
||||
{
|
||||
struct serdev_controller *ctrl = serdev->ctrl;
|
||||
int written = 0;
|
||||
int ret;
|
||||
size_t written = 0;
|
||||
ssize_t ret;
|
||||
|
||||
if (!ctrl || !ctrl->ops->write_buf || !serdev->ops->write_wakeup)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user