diff options
author | Claudio Scordino <claudio@evidence.eu.com> | 2010-05-31 10:19:09 +0200 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2010-08-09 14:10:32 +0200 |
commit | f1d23ed8218ca5afaf178a6495253dbb7fc98f57 (patch) | |
tree | e80045aba944222321ea47ba1dd8a5a2fc741348 /drivers/serial | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) | |
download | op-kernel-dev-f1d23ed8218ca5afaf178a6495253dbb7fc98f57.zip op-kernel-dev-f1d23ed8218ca5afaf178a6495253dbb7fc98f57.tar.gz |
CRIS: ioctl for getting RS485 information
Add ioctl to CRIS serial driver to get RS485 data from user-space.
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/crisv10.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 31f1723..3062644 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c @@ -3724,6 +3724,17 @@ rs_ioctl(struct tty_struct *tty, struct file * file, return e100_enable_rs485(tty, &rs485data); } + case TIOCGRS485: + { + struct serial_rs485 *rs485data = + &(((struct e100_serial *)tty->driver_data)->rs485); + /* This is the ioctl to get RS485 data from user-space */ + if (copy_to_user((struct serial_rs485 *) arg, + rs485data, + sizeof(serial_rs485))) + return -EFAULT; + break; + } case TIOCSERWRRS485: { |