Commit 7954006f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi-data: remove unused parameters from i_pci_card_data()

The pci_bus, pci_slot, and pci_func data returned by i_pci_card_data()
are not used. Remove them from the parameters to the function and also
remove the local variables in i_ADDI_Attach() that held the returned
data.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48d1db93
...@@ -231,8 +231,7 @@ struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, ...@@ -231,8 +231,7 @@ struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id,
int pci_card_alloc(struct pcilst_struct *amcc, int master); int pci_card_alloc(struct pcilst_struct *amcc, int master);
int i_pci_card_free(struct pcilst_struct *amcc); int i_pci_card_free(struct pcilst_struct *amcc);
int i_pci_card_data(struct pcilst_struct *amcc, int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, resource_size_t *io_addr,
unsigned char *pci_func, resource_size_t * io_addr,
unsigned int *irq); unsigned int *irq);
/****************************************************************************/ /****************************************************************************/
...@@ -383,17 +382,13 @@ int i_pci_card_free(struct pcilst_struct *amcc) ...@@ -383,17 +382,13 @@ int i_pci_card_free(struct pcilst_struct *amcc)
/****************************************************************************/ /****************************************************************************/
/* return all card information for driver */ /* return all card information for driver */
int i_pci_card_data(struct pcilst_struct *amcc, int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, resource_size_t *io_addr,
unsigned char *pci_func, resource_size_t * io_addr,
unsigned int *irq) unsigned int *irq)
{ {
int i; int i;
if (!amcc) if (!amcc)
return -1; return -1;
*pci_bus = amcc->pci_bus;
*pci_slot = amcc->pci_slot;
*pci_func = amcc->pci_func;
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
io_addr[i] = amcc->io_addr[i]; io_addr[i] = amcc->io_addr[i];
*irq = amcc->irq; *irq = amcc->irq;
......
...@@ -95,7 +95,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -95,7 +95,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned int irq; unsigned int irq;
resource_size_t iobase_a, iobase_main, iobase_addon, iobase_reserved; resource_size_t iobase_a, iobase_main, iobase_addon, iobase_reserved;
struct pcilst_struct *card = NULL; struct pcilst_struct *card = NULL;
unsigned char pci_bus, pci_slot, pci_func;
int i_Dma = 0; int i_Dma = 0;
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
...@@ -122,8 +121,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -122,8 +121,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->allocated = 1; devpriv->allocated = 1;
if ((i_pci_card_data(card, &pci_bus, &pci_slot, &pci_func, &io_addr[0], if ((i_pci_card_data(card, &io_addr[0], &irq)) < 0) {
&irq)) < 0) {
i_pci_card_free(card); i_pci_card_free(card);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment