[PATCH 23/40] staging: comedi: me4000: use dev->irq to save the irq number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the irq variable provided in the comedi_device to save the
irq number and remove it from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/me4000.c | 8 ++++----
 drivers/staging/comedi/drivers/me4000.h | 2 --
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 418a679..a041054 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -332,7 +332,7 @@ static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p)
 	/* spin_lock_init(&info->ai_ctrl_lock); */
 
 	/* Get the irq assigned to the board */
-	info->irq = pci_dev_p->irq;
+	dev->irq = pci_dev_p->irq;
 
 	return 0;
 }
@@ -1266,7 +1266,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
 	s->async->events = 0;
 
 	/* Check if irq number is right */
-	if (irq != info->irq) {
+	if (irq != dev->irq) {
 		printk(KERN_ERR
 		       "comedi%d: me4000: me4000_ai_isr(): "
 		       "Incorrect interrupt num: %d\n", dev->minor, irq);
@@ -1876,8 +1876,8 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		s->range_table = &me4000_ai_range;
 		s->insn_read = me4000_ai_insn_read;
 
-		if (info->irq > 0) {
-			if (request_irq(info->irq, me4000_ai_isr,
+		if (dev->irq > 0) {
+			if (request_irq(dev->irq, me4000_ai_isr,
 					IRQF_SHARED, "ME-4000", dev)) {
 				printk
 				    ("comedi%d: me4000: me4000_attach(): "
diff --git a/drivers/staging/comedi/drivers/me4000.h b/drivers/staging/comedi/drivers/me4000.h
index 042ec4c..57b02e1 100644
--- a/drivers/staging/comedi/drivers/me4000.h
+++ b/drivers/staging/comedi/drivers/me4000.h
@@ -224,8 +224,6 @@ struct me4000_info {
 
 	struct pci_dev *pci_dev_p;	/*  General PCI information */
 
-	unsigned int irq;	/*  IRQ assigned from the PCI BIOS */
-
 	unsigned int ao_readback[4];
 };
 
-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux