From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261351AbULERWS (ORCPT ); Sun, 5 Dec 2004 12:22:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261363AbULERVf (ORCPT ); Sun, 5 Dec 2004 12:21:35 -0500 Received: from emailhub.stusta.mhn.de ([141.84.69.5]:43275 "HELO mailout.stusta.mhn.de") by vger.kernel.org with SMTP id S261351AbULERQG (ORCPT ); Sun, 5 Dec 2004 12:16:06 -0500 Date: Sun, 5 Dec 2004 18:16:04 +0100 From: Adrian Bunk To: R.E.Wolff@BitWizard.nl Cc: io8-linux@specialix.co.uk, linux-kernel@vger.kernel.org Subject: [2.6 patch] drivers/char/specialix.c: misc cleanups Message-ID: <20041205171604.GY2953@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org The patch below includes cleanups including the following: - remove the unused global function specialix_setup - merge specialix_init_module into specialix_init - rename specialix_exit_module to specialix_exit - make some needlessly global code static diffstat output: drivers/char/specialix.c | 91 +++++++++++---------------------------- 1 files changed, 27 insertions(+), 64 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm3-full/drivers/char/specialix.c.old 2004-11-07 00:55:20.000000000 +0100 +++ linux-2.6.10-rc1-mm3-full/drivers/char/specialix.c 2004-11-07 01:37:43.000000000 +0100 @@ -315,7 +315,7 @@ /* Set the IRQ using the RTS lines that run to the PAL on the board.... */ -int sx_set_irq ( struct specialix_board *bp) +static int sx_set_irq ( struct specialix_board *bp) { int virq; int i; @@ -379,7 +379,7 @@ } -int read_cross_byte (struct specialix_board *bp, int reg, int bit) +static int read_cross_byte (struct specialix_board *bp, int reg, int bit) { int i; int t; @@ -878,7 +878,7 @@ * Routines for open & close processing. */ -void turn_ints_off (struct specialix_board *bp) +static void turn_ints_off (struct specialix_board *bp) { if (bp->flags & SX_BOARD_IS_PCI) { /* This was intended for enabeling the interrupt on the @@ -889,7 +889,7 @@ (void) sx_in_off (bp, 0); /* Turn off interrupts. */ } -void turn_ints_on (struct specialix_board *bp) +static void turn_ints_on (struct specialix_board *bp) { if (bp->flags & SX_BOARD_IS_PCI) { /* play with the PCI chip. See comment above. */ @@ -2094,41 +2094,34 @@ } -#ifndef MODULE +static int iobase[SX_NBOARD] = {0,}; + +static int irq [SX_NBOARD] = {0,}; + +module_param_array(iobase, int, NULL, 0); +module_param_array(irq, int, NULL, 0); + /* - * Called at boot time. + * You can setup up to 4 boards. + * by specifying "iobase=0xXXX,0xXXX ..." as insmod parameter. + * You should specify the IRQs too in that case "irq=....,...". * - * You can specify IO base for up to SX_NBOARD cards, - * using line "specialix=0xiobase1,0xiobase2,.." at LILO prompt. - * Note that there will be no probing at default - * addresses in this case. + * More than 4 boards in one computer is not possible, as the card can + * only use 4 different interrupts. * - */ -void specialix_setup(char *str, int * ints) -{ - int i; - - for (i=0;i