Skip to contentSkip to conversation

Documentation: rs485: Do not define manually the ioctl

PATCH In review Ricardo Ribalda Delgado 2 participants 2 messages Aug 18, 2016 – Aug 19, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: rs485: Do not define manually the ioctl

It is not a very good practice to define the IOCTL manually instead of using the header file.

Fix it on the documentation example.

---
 Documentation/serial/serial-rs485.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/serial/serial-rs485.txt +2 -3
index 2253b8b45a74..389fcd4759e9 100644
@@ -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);
Signature · 1 line
2.8.1
maintainer
#1 lore raw
Quoted 4 lines · On Thu, 18 Aug 2016 10:54:19 +0200 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.

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

jon