Skip to content

Commit

Permalink
Documentation: rs485: Do not define manually the ioctl
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
ribalda authored and Jonathan Corbet committed Aug 18, 2016
1 parent 7a9011d commit 5021bb9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Documentation/serial/serial-rs485.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5021bb9

Please sign in to comment.