public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: rs485: Do not define manually the ioctl
@ 2016-08-18  8:54 Ricardo Ribalda Delgado
  2016-08-18 17:08 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-08-18  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Jonathan Corbet, linux-doc,
	linux-kernel
  Cc: Ricardo Ribalda Delgado

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

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

* Re: [PATCH] Documentation: rs485: Do not define manually the ioctl
  2016-08-18  8:54 [PATCH] Documentation: rs485: Do not define manually the ioctl Ricardo Ribalda Delgado
@ 2016-08-18 17:08 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2016-08-18 17:08 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: Greg Kroah-Hartman, Jiri Slaby, linux-doc, linux-kernel

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

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

end of thread, other threads:[~2016-08-19  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18  8:54 [PATCH] Documentation: rs485: Do not define manually the ioctl Ricardo Ribalda Delgado
2016-08-18 17:08 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox