Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jiri Slaby <jslaby@suse.cz>
Reported-by: Toralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
f678c440 11b397e6

+21 -19
+21 -19
drivers/tty/rocket.c
··· 2519 2519 return (CtlP->NumAiop); 2520 2520 } 2521 2521 2522 + #ifdef CONFIG_PCI 2522 2523 /*************************************************************************** 2523 2524 Function: sPCIInitController 2524 2525 Purpose: Initialization of controller global registers and controller ··· 2639 2638 else 2640 2639 return (CtlP->NumAiop); 2641 2640 } 2641 + 2642 + /* Resets the speaker controller on RocketModem II and III devices */ 2643 + static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model) 2644 + { 2645 + ByteIO_t addr; 2646 + 2647 + /* RocketModem II speaker control is at the 8th port location of offset 0x40 */ 2648 + if ((model == MODEL_RP4M) || (model == MODEL_RP6M)) { 2649 + addr = CtlP->AiopIO[0] + 0x4F; 2650 + sOutB(addr, 0); 2651 + } 2652 + 2653 + /* RocketModem III speaker control is at the 1st port location of offset 0x80 */ 2654 + if ((model == MODEL_UPCI_RM3_8PORT) 2655 + || (model == MODEL_UPCI_RM3_4PORT)) { 2656 + addr = CtlP->AiopIO[0] + 0x88; 2657 + sOutB(addr, 0); 2658 + } 2659 + } 2660 + #endif 2642 2661 2643 2662 /*************************************************************************** 2644 2663 Function: sReadAiopID ··· 3147 3126 if (!on) 3148 3127 addr += 8; 3149 3128 sOutB(addr + chan, 0); /* apply or remove reset */ 3150 - } 3151 - 3152 - /* Resets the speaker controller on RocketModem II and III devices */ 3153 - static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model) 3154 - { 3155 - ByteIO_t addr; 3156 - 3157 - /* RocketModem II speaker control is at the 8th port location of offset 0x40 */ 3158 - if ((model == MODEL_RP4M) || (model == MODEL_RP6M)) { 3159 - addr = CtlP->AiopIO[0] + 0x4F; 3160 - sOutB(addr, 0); 3161 - } 3162 - 3163 - /* RocketModem III speaker control is at the 1st port location of offset 0x80 */ 3164 - if ((model == MODEL_UPCI_RM3_8PORT) 3165 - || (model == MODEL_UPCI_RM3_4PORT)) { 3166 - addr = CtlP->AiopIO[0] + 0x88; 3167 - sOutB(addr, 0); 3168 - } 3169 3129 } 3170 3130 3171 3131 /* Returns the line number given the controller (board), aiop and channel number */