#1944 closed defect

c/src/libchip/serial/mc68681.c: mc68681_close is a nop — at Initial Version

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:


The function mc68681_close in c/src/libchip/serial/mc68681.c essentially is a nop.

MC68681_STATIC int mc68681_close(

int major,
int minor,
void *arg


uint32_t pMC68681;
uint32_t pMC68681_port;
setRegister_f setReg;

pMC68681 = Console_Port_Tbl[minor]->ulCtrlPort1;
pMC68681_port = Console_Port_Tbl[minor]->ulCtrlPort2;
setReg = Console_Port_Tbl[minor]->setRegister;


  • Disable interrupts from this channel and then disable it totally. */

#if 0

(*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_TX );
(*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_RX );




Note the "#if 0" - This #define renders the function into an obscure way to "do nothing" - Modern gcc's diagnose this and complain about it.

I don't know what to do about this issue, nor about what is intended. In particular, I don't know, if this "#if 0" is intentional or if fragments of somebody's debugging/testing have accidentially crept into the sources.

May the folks who actually use the code please comment and/or fix this ;)

Change History (1)

Changed on Oct 28, 2011 at 12:59:15 PM by Joel Sherrill

Attachment: pr1944.diff added

Remove if 0

Note: See TracTickets for help on using tickets.