提交 5021bb93 编写于 作者: R Ricardo Ribalda Delgado 提交者: Jonathan Corbet

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.
Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 7a9011db
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册