Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465007 > unrolled thread

[PATCH] Documentation: rs485: Do not define manually the ioctl

Started byRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
First post2016-08-18 11:00 +0200
Last post2016-08-19 03:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Documentation: rs485: Do not define manually the ioctl Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-08-18 11:00 +0200
    Re: [PATCH] Documentation: rs485: Do not define manually the ioctl Jonathan Corbet <corbet@lwn.net> - 2016-08-19 03:50 +0200

#1465007 — [PATCH] Documentation: rs485: Do not define manually the ioctl

FromRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date2016-08-18 11:00 +0200
Subject[PATCH] Documentation: rs485: Do not define manually the ioctl
Message-ID<s7rl8-5No-23@gated-at.bofh.it>
It is not a very good practice to define the IOCTL manually instead of
using the header file.

Fix it on the documentation example.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 Documentation/serial/serial-rs485.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt
index 2253b8b45a74..389fcd4759e9 100644
--- a/Documentation/serial/serial-rs485.txt
+++ b/Documentation/serial/serial-rs485.txt
@@ -45,9 +45,8 @@
 
 	#include <linux/serial.h>
 
-	/* RS485 ioctls: */
-	#define TIOCGRS485      0x542E
-	#define TIOCSRS485      0x542F
+	/* Include definition for RS485 ioctls: TIOCGRS485 and TIOCSRS485 */
+	#include <sys/ioctl.h>
 
 	/* Open your specific device (e.g., /dev/mydevice): */
 	int fd = open ("/dev/mydevice", O_RDWR);
-- 
2.8.1

[toc] | [next] | [standalone]


#1465845

FromJonathan Corbet <corbet@lwn.net>
Date2016-08-19 03:50 +0200
Message-ID<s7H6y-7vO-37@gated-at.bofh.it>
In reply to#1465007
On Thu, 18 Aug 2016 10:54:19 +0200
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:

> It is not a very good practice to define the IOCTL manually instead of
> using the header file.
> 
> Fix it on the documentation example.

Makes sense to me; applied to the docs tree, thanks.

jon

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web