lkml.org 
[lkml]   [2004]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.6.1-mm3
Date
Hi,

the patch "serial-03-fixups.patch" introduced following compile error:

CC [M] drivers/char/riscom8.o
drivers/char/riscom8.c: In function `rc_tiocmget':
drivers/char/riscom8.c:1323: error: `result' undeclared (first use in this
function)
drivers/char/riscom8.c:1323: error: (Each undeclared identifier is reported
only once
drivers/char/riscom8.c:1323: error: for each function it appears in.)
drivers/char/riscom8.c: In function `rc_tiocmset':
drivers/char/riscom8.c:1336: Warnung: unused variable `arg'
drivers/char/riscom8.c: At top level:
drivers/char/riscom8.c:1669: error: `rx_tiocmset' undeclared here (not in a
function)
drivers/char/riscom8.c:1669: error: initializer element is not constant
drivers/char/riscom8.c:1669: error: (near initialization for
`riscom_ops.tiocmset')
drivers/char/riscom8.c:1334: Warnung: `rc_tiocmset' defined but not used

The attached patch fixes it...

Thomas Schlichter
--- linux-2.6.1-mm3/drivers/char/riscom8.c.orig 2004-01-14 19:24:19.684774056 +0100
+++ linux-2.6.1-mm3/drivers/char/riscom8.c 2004-01-14 19:31:05.567070568 +0100
@@ -1311,6 +1311,7 @@
struct riscom_port *port = (struct riscom_port *)tty->driver_data;
struct riscom_board * bp;
unsigned char status;
+ unsigned int result;
unsigned long flags;

if (rc_paranoia_check(port, tty->name, __FUNCTION__))
@@ -1322,18 +1323,18 @@
status = rc_in(bp, CD180_MSVR);
result = rc_in(bp, RC_RI) & (1u << port_No(port)) ? 0 : TIOCM_RNG;
restore_flags(flags);
- return ((status & MSVR_RTS) ? TIOCM_RTS : 0)
+ result |= ((status & MSVR_RTS) ? TIOCM_RTS : 0)
| ((status & MSVR_DTR) ? TIOCM_DTR : 0)
| ((status & MSVR_CD) ? TIOCM_CAR : 0)
| ((status & MSVR_DSR) ? TIOCM_DSR : 0)
| ((status & MSVR_CTS) ? TIOCM_CTS : 0);
+ return result;
}

static int rc_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
{
struct riscom_port *port = (struct riscom_port *)tty->driver_data;
- unsigned int arg;
unsigned long flags;
struct riscom_board *bp;

@@ -1666,7 +1667,7 @@
.start = rc_start,
.hangup = rc_hangup,
.tiocmget = rc_tiocmget,
- .tiocmset = rx_tiocmset,
+ .tiocmset = rc_tiocmset,
};

static inline int rc_init_drivers(void)[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.056 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site