Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f678c440 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

TTY: rocket, fix compilation warning



When CONFIG_PCI is unset, we see these warnings in rocket:
  drivers/tty/rocket.c:3140:13: warning: 'rmSpeakerReset' defined but not used
  drivers/tty/rocket.c:2599:12: warning: 'sPCIInitController' defined but not used

Fix those by moving the functions to one place and make them depend on
CONFIG_PCI.

Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Reported-by: default avatarToralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11b397e6
Loading
Loading
Loading
Loading
+21 −19
Original line number Original line Diff line number Diff line
@@ -2519,6 +2519,7 @@ static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO,
		return (CtlP->NumAiop);
		return (CtlP->NumAiop);
}
}


#ifdef CONFIG_PCI
/***************************************************************************
/***************************************************************************
Function: sPCIInitController
Function: sPCIInitController
Purpose:  Initialization of controller global registers and controller
Purpose:  Initialization of controller global registers and controller
@@ -2639,6 +2640,26 @@ static int sPCIInitController(CONTROLLER_T * CtlP, int CtlNum,
		return (CtlP->NumAiop);
		return (CtlP->NumAiop);
}
}


/*  Resets the speaker controller on RocketModem II and III devices */
static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model)
{
	ByteIO_t addr;

	/* RocketModem II speaker control is at the 8th port location of offset 0x40 */
	if ((model == MODEL_RP4M) || (model == MODEL_RP6M)) {
		addr = CtlP->AiopIO[0] + 0x4F;
		sOutB(addr, 0);
	}

	/* RocketModem III speaker control is at the 1st port location of offset 0x80 */
	if ((model == MODEL_UPCI_RM3_8PORT)
	    || (model == MODEL_UPCI_RM3_4PORT)) {
		addr = CtlP->AiopIO[0] + 0x88;
		sOutB(addr, 0);
	}
}
#endif

/***************************************************************************
/***************************************************************************
Function: sReadAiopID
Function: sReadAiopID
Purpose:  Read the AIOP idenfication number directly from an AIOP.
Purpose:  Read the AIOP idenfication number directly from an AIOP.
@@ -3128,25 +3149,6 @@ static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on)
	sOutB(addr + chan, 0);	/* apply or remove reset */
	sOutB(addr + chan, 0);	/* apply or remove reset */
}
}


/*  Resets the speaker controller on RocketModem II and III devices */
static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model)
{
	ByteIO_t addr;

	/* RocketModem II speaker control is at the 8th port location of offset 0x40 */
	if ((model == MODEL_RP4M) || (model == MODEL_RP6M)) {
		addr = CtlP->AiopIO[0] + 0x4F;
		sOutB(addr, 0);
	}

	/* RocketModem III speaker control is at the 1st port location of offset 0x80 */
	if ((model == MODEL_UPCI_RM3_8PORT)
	    || (model == MODEL_UPCI_RM3_4PORT)) {
		addr = CtlP->AiopIO[0] + 0x88;
		sOutB(addr, 0);
	}
}

/*  Returns the line number given the controller (board), aiop and channel number */
/*  Returns the line number given the controller (board), aiop and channel number */
static unsigned char GetLineNumber(int ctrl, int aiop, int ch)
static unsigned char GetLineNumber(int ctrl, int aiop, int ch)
{
{