From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Rob Herring <robh@kernel.org>
Subject: [PATCH v2 16/31] tty: serdev: drop serdev_controller_ops::write_room()
Date: Mon, 17 Mar 2025 08:00:31 +0100 [thread overview]
Message-ID: <20250317070046.24386-17-jirislaby@kernel.org> (raw)
In-Reply-To: <20250317070046.24386-1-jirislaby@kernel.org>
In particular, serdev_device_write_room() is not called, so the whole
serdev's write_room() can go.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Rob Herring <robh@kernel.org>
---
drivers/tty/serdev/core.c | 11 -----------
drivers/tty/serdev/serdev-ttyport.c | 9 ---------
include/linux/serdev.h | 6 ------
3 files changed, 26 deletions(-)
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index ebf0bbc2cff2..eb2a2e58fe78 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -316,17 +316,6 @@ void serdev_device_write_flush(struct serdev_device *serdev)
}
EXPORT_SYMBOL_GPL(serdev_device_write_flush);
-int serdev_device_write_room(struct serdev_device *serdev)
-{
- struct serdev_controller *ctrl = serdev->ctrl;
-
- if (!ctrl || !ctrl->ops->write_room)
- return 0;
-
- return serdev->ctrl->ops->write_room(ctrl);
-}
-EXPORT_SYMBOL_GPL(serdev_device_write_room);
-
unsigned int serdev_device_set_baudrate(struct serdev_device *serdev, unsigned int speed)
{
struct serdev_controller *ctrl = serdev->ctrl;
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index 3d7ae7fa5018..bab1b143b8a6 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -92,14 +92,6 @@ static void ttyport_write_flush(struct serdev_controller *ctrl)
tty_driver_flush_buffer(tty);
}
-static int ttyport_write_room(struct serdev_controller *ctrl)
-{
- struct serport *serport = serdev_controller_get_drvdata(ctrl);
- struct tty_struct *tty = serport->tty;
-
- return tty_write_room(tty);
-}
-
static int ttyport_open(struct serdev_controller *ctrl)
{
struct serport *serport = serdev_controller_get_drvdata(ctrl);
@@ -259,7 +251,6 @@ static int ttyport_break_ctl(struct serdev_controller *ctrl, unsigned int break_
static const struct serdev_controller_ops ctrl_ops = {
.write_buf = ttyport_write_buf,
.write_flush = ttyport_write_flush,
- .write_room = ttyport_write_room,
.open = ttyport_open,
.close = ttyport_close,
.set_flow_control = ttyport_set_flow_control,
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index ff78efc1f60d..34562eb99931 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -84,7 +84,6 @@ enum serdev_parity {
struct serdev_controller_ops {
ssize_t (*write_buf)(struct serdev_controller *, const u8 *, size_t);
void (*write_flush)(struct serdev_controller *);
- int (*write_room)(struct serdev_controller *);
int (*open)(struct serdev_controller *);
void (*close)(struct serdev_controller *);
void (*set_flow_control)(struct serdev_controller *, bool);
@@ -212,7 +211,6 @@ int serdev_device_break_ctl(struct serdev_device *serdev, int break_state);
void serdev_device_write_wakeup(struct serdev_device *);
ssize_t serdev_device_write(struct serdev_device *, const u8 *, size_t, long);
void serdev_device_write_flush(struct serdev_device *);
-int serdev_device_write_room(struct serdev_device *);
/*
* serdev device driver functions
@@ -273,10 +271,6 @@ static inline ssize_t serdev_device_write(struct serdev_device *sdev,
return -ENODEV;
}
static inline void serdev_device_write_flush(struct serdev_device *sdev) {}
-static inline int serdev_device_write_room(struct serdev_device *sdev)
-{
- return 0;
-}
#define serdev_device_driver_register(x)
#define serdev_device_driver_unregister(x)
--
2.49.0
next prev parent reply other threads:[~2025-03-17 7:01 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 7:00 [PATCH v2 00/31] tty: cleanup no. 99 Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 01/31] tty: convert "TTY Struct Flags" to an enum Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 02/31] tty: audit: do not use N_TTY_BUF_SIZE Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 03/31] tty: caif: " Jiri Slaby (SUSE)
2025-03-20 11:17 ` Simon Horman
2025-03-17 7:00 ` [PATCH v2 04/31] tty: move N_TTY_BUF_SIZE to n_tty Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 05/31] tty: n_tty: use uint for space returned by tty_write_room() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 06/31] tty: n_tty: simplify process_output() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 07/31] tty: n_tty: clean up process_output_block() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 08/31] tty: n_tty: drop n_tty_trace() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 09/31] tty: n_tty: extract n_tty_continue_cookie() from n_tty_read() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 10/31] tty: n_tty: extract n_tty_wait_for_input() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 11/31] tty: n_tty: move more_to_be_read to the end of n_tty_read() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 12/31] tty: tty_driver: move TTY macros to the top Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 13/31] tty: tty_driver: convert "TTY Driver Flags" to an enum Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 14/31] tty: tty_driver: document both {,__}tty_alloc_driver() properly Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 15/31] tty: tty_driver: introduce TTY driver sub/types enums Jiri Slaby (SUSE)
2025-03-17 7:00 ` Jiri Slaby (SUSE) [this message]
2025-03-17 7:00 ` [PATCH v2 17/31] tty: mmc: sdio: use bool for cts and remove parentheses Jiri Slaby (SUSE)
2025-03-17 10:50 ` Ulf Hansson
2025-03-17 7:00 ` [PATCH v2 18/31] tty: moxa: drop version dump to logs Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 19/31] tty: moxa: drop ISA support Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 20/31] tty: moxa: carve out special ioctls and extra tty_port Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 21/31] tty: srmcons: fix retval from srmcons_init() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 22/31] tty: staging/greybus: pass tty_driver flags to tty_alloc_driver() Jiri Slaby (SUSE)
2025-03-17 12:35 ` Alex Elder
2025-03-17 7:00 ` [PATCH v2 23/31] tty: sunsu: drop serial_{in,out}p() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 24/31] tty: sunsu: remove unused serial_icr_read() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 25/31] serial: remove redundant tty_port_link_device() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 26/31] serial: pass struct uart_state to uart_line_info() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 27/31] serial: 8250: use serial_port_in/out() helpers Jiri Slaby (SUSE)
2025-03-17 7:25 ` Andy Shevchenko
2025-03-17 7:42 ` Jiri Slaby
2025-03-17 7:00 ` [PATCH v2 28/31] serial: 8250_rsa: simplify rsa8250_{request/release}_resource() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 29/31] serial: 8250_port: do not use goto for UPQ_NO_TXEN_TEST code flow Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 30/31] serial: 8250_port: simplify serial8250_request_std_resource() Jiri Slaby (SUSE)
2025-03-17 7:00 ` [PATCH v2 31/31] serial: switch change_irq and change_port to bool in uart_set_info() Jiri Slaby (SUSE)
2025-03-17 7:03 ` [PATCH v2 00/31] tty: cleanup no. 99 Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250317070046.24386-17-jirislaby@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox