From: David Schleef Date: Sun, 17 Mar 2002 22:03:30 +0000 (+0000) Subject: Fixed symbol leakage. Updated documentation. X-Git-Tag: r0_7_64~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=660f51993a2804051382d4336a6cdbdedb7457ab;p=comedi.git Fixed symbol leakage. Updated documentation. --- diff --git a/comedi/drivers/icp_multi.c b/comedi/drivers/icp_multi.c index 05d3ceb6..af5c55ca 100644 --- a/comedi/drivers/icp_multi.c +++ b/comedi/drivers/icp_multi.c @@ -25,6 +25,7 @@ Driver: icp_multi.o Author: Anne Smorthit Devices: [Inova] ICP_MULTI (icp_multi) +Status: unknown Options: [0] - PCI bus number - if bus number and slot number are 0, @@ -102,7 +103,7 @@ Options: // Define analogue range -comedi_lrange range_analog={ 4, { +static comedi_lrange range_analog={ 4, { UNI_RANGE(5), UNI_RANGE(10), BIP_RANGE(5), @@ -170,7 +171,7 @@ static boardtype boardtypes[] = #define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype)) -comedi_driver driver_icp_multi={ +static comedi_driver driver_icp_multi={ driver_name: "icp_multi", module: THIS_MODULE, attach: icp_multi_attach, @@ -179,6 +180,7 @@ comedi_driver driver_icp_multi={ board_name: boardtypes, offset: sizeof(boardtype), }; +COMEDI_INITCLEANUP(driver_icp_multi); typedef struct{ char valid; // card is usable @@ -207,8 +209,10 @@ typedef struct{ ============================================================================== */ -int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan); -void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan); +#if 0 +static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan); +#endif +static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan); static int icp_multi_reset(comedi_device *dev); @@ -237,7 +241,7 @@ static int icp_multi_reset(comedi_device *dev); ============================================================================== */ -int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) { int n,timeout; @@ -344,7 +348,7 @@ conv_finish: ============================================================================== */ -int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) { int n, chan, range, timeout; @@ -445,7 +449,7 @@ dac_ready: ============================================================================== */ -int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) { int n,chan; @@ -477,7 +481,7 @@ int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_ins ============================================================================== */ -int icp_multi_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn, lsampl_t *data) { data[1] = readw(dev->iobase + ICP_MULTI_DI); @@ -544,7 +548,7 @@ static int icp_multi_insn_bits_do(comedi_device *dev,comedi_subdevice *s, comedi ============================================================================== */ -int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) { return 0; } @@ -568,7 +572,7 @@ int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s, comedi_in ============================================================================== */ -int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) +static int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data) { return 0; } @@ -642,6 +646,7 @@ static void interrupt_service_icp_multi(int irq, void *d, struct pt_regs *regs) } +#if 0 /* ============================================================================== @@ -662,7 +667,7 @@ static void interrupt_service_icp_multi(int irq, void *d, struct pt_regs *regs) ============================================================================== */ -int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan) +static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan) { unsigned int i; @@ -693,6 +698,7 @@ int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int * } return 1; } +#endif @@ -716,7 +722,7 @@ int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int * ============================================================================== */ -void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, +static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan) { unsigned int i, range, chanprog; @@ -1062,11 +1068,3 @@ static int icp_multi_detach(comedi_device *dev) return 0; } -/* -============================================================================== -*/ -COMEDI_INITCLEANUP(driver_icp_multi); -/* -============================================================================== -*/ - diff --git a/comedi/drivers/icp_multi.h b/comedi/drivers/icp_multi.h index d8c3afa6..6cb28061 100644 --- a/comedi/drivers/icp_multi.h +++ b/comedi/drivers/icp_multi.h @@ -35,23 +35,23 @@ struct pcilst_struct *inova_devices; // ptr to root list of all Inova devices /****************************************************************************/ -void pci_card_list_init(unsigned short pci_vendor, char display); -void pci_card_list_cleanup(unsigned short pci_vendor); -struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id); -int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card); -struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot); - -int pci_card_alloc(struct pcilst_struct *amcc); -int pci_card_free(struct pcilst_struct *amcc); -void pci_card_list_display(void); -int pci_card_data(struct pcilst_struct *amcc, +static void pci_card_list_init(unsigned short pci_vendor, char display); +static void pci_card_list_cleanup(unsigned short pci_vendor); +static struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id); +static int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card); +static struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot); + +static int pci_card_alloc(struct pcilst_struct *amcc); +static int pci_card_free(struct pcilst_struct *amcc); +static void pci_card_list_display(void); +static int pci_card_data(struct pcilst_struct *amcc, unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func, unsigned long *io_addr, unsigned short *irq, unsigned short *master); /****************************************************************************/ /* build list of Inova cards in this system */ -void pci_card_list_init(unsigned short pci_vendor, char display) +static void pci_card_list_init(unsigned short pci_vendor, char display) { struct pci_dev *pcidev; struct pcilst_struct *inova,*last; @@ -95,7 +95,7 @@ inova->master = 1; //XXX /****************************************************************************/ /* free up list of amcc cards in this system */ -void pci_card_list_cleanup(unsigned short pci_vendor) +static void pci_card_list_cleanup(unsigned short pci_vendor) { struct pcilst_struct *inova,*next; @@ -109,7 +109,7 @@ void pci_card_list_cleanup(unsigned short pci_vendor) /****************************************************************************/ /* find first unused card with this device_id */ -struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id) +static struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id) { struct pcilst_struct *inova,*next; @@ -124,7 +124,7 @@ struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, uns /****************************************************************************/ /* find card on requested position */ -int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card) +static int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card) { struct pcilst_struct *inova,*next; @@ -146,7 +146,7 @@ int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short devi /****************************************************************************/ /* mark card as used */ -int pci_card_alloc(struct pcilst_struct *inova) +static int pci_card_alloc(struct pcilst_struct *inova) { if (!inova) return -1; @@ -158,7 +158,7 @@ int pci_card_alloc(struct pcilst_struct *inova) /****************************************************************************/ /* mark card as free */ -int pci_card_free(struct pcilst_struct *inova) +static int pci_card_free(struct pcilst_struct *inova) { if (!inova) return -1; @@ -169,7 +169,7 @@ int pci_card_free(struct pcilst_struct *inova) /****************************************************************************/ /* display list of found cards */ -void pci_card_list_display(void) +static void pci_card_list_display(void) { struct pcilst_struct *inova, *next; @@ -187,7 +187,7 @@ void pci_card_list_display(void) /****************************************************************************/ /* return all card information for driver */ -int pci_card_data(struct pcilst_struct *inova, +static int pci_card_data(struct pcilst_struct *inova, unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func, unsigned long *io_addr, unsigned short *irq, unsigned short *master) { @@ -206,7 +206,7 @@ int pci_card_data(struct pcilst_struct *inova, /****************************************************************************/ /* select and alloc card */ -struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot) +static struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot) { struct pcilst_struct *card;