Commit d2a457cf authored by M.Baris Demiray's avatar M.Baris Demiray Committed by Linus Torvalds

[PATCH] riotty.c cleanups and warning fix

Fix a bunch of whitespace oddities and use `unsigned long' for a
jiffies-holding variable.
Signed-off-by: default avatarM.Baris Demiray <baris@labristeknoloji.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2b1ee233
...@@ -524,16 +524,16 @@ riotclose(void *ptr) ...@@ -524,16 +524,16 @@ riotclose(void *ptr)
register uint SysPort = dev; register uint SysPort = dev;
struct ttystatics *tp; /* pointer to our ttystruct */ struct ttystatics *tp; /* pointer to our ttystruct */
#endif #endif
struct Port *PortP =ptr; /* pointer to the port structure */ struct Port *PortP = ptr; /* pointer to the port structure */
int deleted = 0; int deleted = 0;
int try = -1; /* Disable the timeouts by setting them to -1 */ int try = -1; /* Disable the timeouts by setting them to -1 */
int repeat_this = -1; /* Congrats to those having 15 years of int repeat_this = -1; /* Congrats to those having 15 years of
uptime! (You get to break the driver.) */ uptime! (You get to break the driver.) */
long end_time; unsigned long end_time;
struct tty_struct * tty; struct tty_struct * tty;
unsigned long flags; unsigned long flags;
int Modem; int Modem;
int rv =0; int rv = 0;
rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum); rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum);
...@@ -620,7 +620,7 @@ riotclose(void *ptr) ...@@ -620,7 +620,7 @@ riotclose(void *ptr)
if (repeat_this -- <= 0) { if (repeat_this -- <= 0) {
rv = -EINTR; rv = -EINTR;
rio_dprintk (RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); rio_dprintk (RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n");
RIOPreemptiveCmd(p, PortP, FCLOSE ); RIOPreemptiveCmd(p, PortP, FCLOSE);
goto close_end; goto close_end;
} }
rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n");
...@@ -656,13 +656,11 @@ riotclose(void *ptr) ...@@ -656,13 +656,11 @@ riotclose(void *ptr)
goto close_end; goto close_end;
} }
/* Can't call RIOShortCommand with the port locked. */ /* Can't call RIOShortCommand with the port locked. */
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) {
RIOPreemptiveCmd(p, PortP,FCLOSE); RIOPreemptiveCmd(p, PortP, FCLOSE);
goto close_end; goto close_end;
} }
...@@ -698,7 +696,6 @@ riotclose(void *ptr) ...@@ -698,7 +696,6 @@ riotclose(void *ptr)
*/ */
PortP->Config &= ~(RIO_CTSFLOW|RIO_RTSFLOW); PortP->Config &= ~(RIO_CTSFLOW|RIO_RTSFLOW);
#ifdef STATS #ifdef STATS
PortP->Stat.CloseCnt++; PortP->Stat.CloseCnt++;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment