linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: sh-sci: Use DEVICE_ATTR_RW() for rx_fifo_trigger
@ 2019-07-31 12:45 Geert Uytterhoeven
  2019-07-31 13:24 ` Ulrich Hecht
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-07-31 12:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Joe Perches, Ulrich Hecht, linux-serial, linux-renesas-soc,
	linux-kernel, Geert Uytterhoeven

While commit b6b996b6cdeecf7e ("treewide: Use DEVICE_ATTR_RW") converted
the rx_fifo_timeout attribute, it forgot to convert rx_fifo_trigger due
to a slightly different function naming.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/tty/serial/sh-sci.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index d18c680aa64b3427..57638175639e0f3f 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1092,9 +1092,8 @@ static void rx_fifo_timer_fn(struct timer_list *t)
 	scif_set_rtrg(port, 1);
 }
 
-static ssize_t rx_trigger_show(struct device *dev,
-			       struct device_attribute *attr,
-			       char *buf)
+static ssize_t rx_fifo_trigger_show(struct device *dev,
+				    struct device_attribute *attr, char *buf)
 {
 	struct uart_port *port = dev_get_drvdata(dev);
 	struct sci_port *sci = to_sci_port(port);
@@ -1102,10 +1101,9 @@ static ssize_t rx_trigger_show(struct device *dev,
 	return sprintf(buf, "%d\n", sci->rx_trigger);
 }
 
-static ssize_t rx_trigger_store(struct device *dev,
-				struct device_attribute *attr,
-				const char *buf,
-				size_t count)
+static ssize_t rx_fifo_trigger_store(struct device *dev,
+				     struct device_attribute *attr,
+				     const char *buf, size_t count)
 {
 	struct uart_port *port = dev_get_drvdata(dev);
 	struct sci_port *sci = to_sci_port(port);
@@ -1123,7 +1121,7 @@ static ssize_t rx_trigger_store(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(rx_fifo_trigger, 0644, rx_trigger_show, rx_trigger_store);
+static DEVICE_ATTR_RW(rx_fifo_trigger);
 
 static ssize_t rx_fifo_timeout_show(struct device *dev,
 			       struct device_attribute *attr,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] serial: sh-sci: Use DEVICE_ATTR_RW() for rx_fifo_trigger
  2019-07-31 12:45 [PATCH] serial: sh-sci: Use DEVICE_ATTR_RW() for rx_fifo_trigger Geert Uytterhoeven
@ 2019-07-31 13:24 ` Ulrich Hecht
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Hecht @ 2019-07-31 13:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Greg Kroah-Hartman, Jiri Slaby
  Cc: Joe Perches, Ulrich Hecht, linux-serial, linux-renesas-soc, linux-kernel


> On July 31, 2019 at 2:45 PM Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> 
> 
> While commit b6b996b6cdeecf7e ("treewide: Use DEVICE_ATTR_RW") converted
> the rx_fifo_timeout attribute, it forgot to convert rx_fifo_trigger due
> to a slightly different function naming.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/tty/serial/sh-sci.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index d18c680aa64b3427..57638175639e0f3f 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -1092,9 +1092,8 @@ static void rx_fifo_timer_fn(struct timer_list *t)
>  	scif_set_rtrg(port, 1);
>  }
>  
> -static ssize_t rx_trigger_show(struct device *dev,
> -			       struct device_attribute *attr,
> -			       char *buf)
> +static ssize_t rx_fifo_trigger_show(struct device *dev,
> +				    struct device_attribute *attr, char *buf)
>  {
>  	struct uart_port *port = dev_get_drvdata(dev);
>  	struct sci_port *sci = to_sci_port(port);
> @@ -1102,10 +1101,9 @@ static ssize_t rx_trigger_show(struct device *dev,
>  	return sprintf(buf, "%d\n", sci->rx_trigger);
>  }
>  
> -static ssize_t rx_trigger_store(struct device *dev,
> -				struct device_attribute *attr,
> -				const char *buf,
> -				size_t count)
> +static ssize_t rx_fifo_trigger_store(struct device *dev,
> +				     struct device_attribute *attr,
> +				     const char *buf, size_t count)
>  {
>  	struct uart_port *port = dev_get_drvdata(dev);
>  	struct sci_port *sci = to_sci_port(port);
> @@ -1123,7 +1121,7 @@ static ssize_t rx_trigger_store(struct device *dev,
>  	return count;
>  }
>  
> -static DEVICE_ATTR(rx_fifo_trigger, 0644, rx_trigger_show, rx_trigger_store);
> +static DEVICE_ATTR_RW(rx_fifo_trigger);
>  
>  static ssize_t rx_fifo_timeout_show(struct device *dev,
>  			       struct device_attribute *attr,
> -- 
> 2.17.1
>

Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>

CU
Uli

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-31 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 12:45 [PATCH] serial: sh-sci: Use DEVICE_ATTR_RW() for rx_fifo_trigger Geert Uytterhoeven
2019-07-31 13:24 ` Ulrich Hecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).