git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
char
/
ip2
/
i2lib.c
diff --git
a/drivers/char/ip2/i2lib.c
b/drivers/char/ip2/i2lib.c
index
82c5f30
..
7804576
100644
(file)
--- a/
drivers/char/ip2/i2lib.c
+++ b/
drivers/char/ip2/i2lib.c
@@
-84,8
+84,8
@@
static void iiSendPendingMail(i2eBordStrPtr);
static void serviceOutgoingFifo(i2eBordStrPtr);
// Functions defined in ip2.c as part of interrupt handling
static void serviceOutgoingFifo(i2eBordStrPtr);
// Functions defined in ip2.c as part of interrupt handling
-static void do_input(
void
*);
-static void do_status(
void
*);
+static void do_input(
struct work_struct
*);
+static void do_status(
struct work_struct
*);
//***************
//* Debug Data *
//***************
//* Debug Data *
@@
-331,8
+331,8
@@
i2InitChannels ( i2eBordStrPtr pB, int nChannels, i2ChanStrPtr pCh)
pCh->ClosingWaitTime = 30*HZ;
// Initialize task queue objects
pCh->ClosingWaitTime = 30*HZ;
// Initialize task queue objects
- INIT_WORK(&pCh->tqueue_input, do_input
, pCh
);
- INIT_WORK(&pCh->tqueue_status, do_status
, pCh
);
+ INIT_WORK(&pCh->tqueue_input, do_input);
+ INIT_WORK(&pCh->tqueue_status, do_status);
#ifdef IP2DEBUG_TRACE
pCh->trace = ip2trace;
#ifdef IP2DEBUG_TRACE
pCh->trace = ip2trace;
@@
-655,8
+655,7
@@
i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands,
timeout--; // So negative values == forever
if (!in_interrupt()) {
timeout--; // So negative values == forever
if (!in_interrupt()) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1); // short nap
+ schedule_timeout_interruptible(1); // short nap
} else {
// we cannot sched/sleep in interrrupt silly
return 0;
} else {
// we cannot sched/sleep in interrrupt silly
return 0;
@@
-855,7
+854,7
@@
i2Input(i2ChanStrPtr pCh)
count += IBUF_SIZE;
}
// Don't give more than can be taken by the line discipline
count += IBUF_SIZE;
}
// Don't give more than can be taken by the line discipline
- amountToMove = pCh->pTTY->
ldisc.receive_room( pCh->pTTY )
;
+ amountToMove = pCh->pTTY->
receive_room
;
if (count > amountToMove) {
count = amountToMove;
}
if (count > amountToMove) {
count = amountToMove;
}
@@
-1008,7
+1007,7
@@
i2InputAvailable(i2ChanStrPtr pCh)
// applications that one cannot break out of.
//******************************************************************************
static int
// applications that one cannot break out of.
//******************************************************************************
static int
-i2Output(i2ChanStrPtr pCh, const char *pSource, int count
, int user
)
+i2Output(i2ChanStrPtr pCh, const char *pSource, int count)
{
i2eBordStrPtr pB;
unsigned char *pInsert;
{
i2eBordStrPtr pB;
unsigned char *pInsert;
@@
-1017,11
+1016,10
@@
i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
unsigned short channel;
unsigned short stuffIndex;
unsigned long flags;
unsigned short channel;
unsigned short stuffIndex;
unsigned long flags;
- int rc = 0;
int bailout = 10;
int bailout = 10;
- ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count,
user
);
+ ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count,
0
);
// Ensure channel structure seems real
if ( !i2Validate ( pCh ) )
// Ensure channel structure seems real
if ( !i2Validate ( pCh ) )
@@
-1088,12
+1086,7
@@
i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
DATA_COUNT_OF(pInsert) = amountToMove;
// Move the data
DATA_COUNT_OF(pInsert) = amountToMove;
// Move the data
- if ( user ) {
- rc = copy_from_user((char*)(DATA_OF(pInsert)), pSource,
- amountToMove );
- } else {
- memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );
- }
+ memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );
// Adjust pointers and indices
pSource += amountToMove;
pCh->Obuf_char_count += amountToMove;
// Adjust pointers and indices
pSource += amountToMove;
pCh->Obuf_char_count += amountToMove;
@@
-1132,8
+1125,7
@@
i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
ip2trace (CHANN, ITRC_OUTPUT, 61, 0 );
ip2trace (CHANN, ITRC_OUTPUT, 61, 0 );
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(2);
+ schedule_timeout_interruptible(2);
if (signal_pending(current)) {
break;
}
if (signal_pending(current)) {
break;
}
@@
-1580,7
+1572,7
@@
i2StripFifo(i2eBordStrPtr pB)
#ifdef USE_IQ
schedule_work(&pCh->tqueue_input);
#else
#ifdef USE_IQ
schedule_work(&pCh->tqueue_input);
#else
- do_input(
pCh
);
+ do_input(
&pCh->tqueue_input
);
#endif
// Note we do not need to maintain any flow-control credits at this
#endif
// Note we do not need to maintain any flow-control credits at this
@@
-1817,7
+1809,7
@@
i2StripFifo(i2eBordStrPtr pB)
#ifdef USE_IQ
schedule_work(&pCh->tqueue_status);
#else
#ifdef USE_IQ
schedule_work(&pCh->tqueue_status);
#else
- do_status(
pCh
);
+ do_status(
&pCh->tqueue_status
);
#endif
}
}
#endif
}
}