]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] cciss: pdev->intr fix
authorMike Miller <mike.miller@hp.com>
Mon, 23 Aug 2004 06:08:30 +0000 (23:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:08:30 +0000 (23:08 -0700)
This patch fixes our usage of pdev->intr.  We were truncating it to an unchar.
 We were also reading it before calling pci_enable_device.  This patch fixes
both of those.  Thanks to Bjorn Helgaas for the patch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/cciss.c
drivers/block/cciss.h

index e7800e1614d83eea370dfe78285ffd8f4a2a2117..3b93d107465258eef98f22e3d0ae5b556727c6b4 100644 (file)
@@ -2300,7 +2300,6 @@ static int find_PCI_BAR_index(struct pci_dev *pdev,
 static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
 {
        ushort subsystem_vendor_id, subsystem_device_id, command;
-       unchar irq = pdev->irq;
        __u32 board_id, scratchpad = 0;
        __u64 cfg_offset;
        __u32 cfg_base_addr;
@@ -2359,11 +2358,11 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
 
 #ifdef CCISS_DEBUG
        printk("command = %x\n", command);
-       printk("irq = %x\n", irq);
+       printk("irq = %x\n", pdev->irq);
        printk("board_id = %x\n", board_id);
 #endif /* CCISS_DEBUG */ 
 
-       c->intr = irq;
+       c->intr = pdev->irq;
 
        /*
         * Memory base addr is first addr , the second points to the config
index 825855cd4ec229b757cfaf4c2b2a16fdee6fe347..ac073dd2e311fe17a47fb1fa7e493506b45aaeab 100644 (file)
@@ -48,7 +48,7 @@ struct ctlr_info
        unsigned long io_mem_addr;
        unsigned long io_mem_length;
        CfgTable_struct *cfgtable;
-       int     intr;
+       unsigned int intr;
        int     interrupts_enabled;
        int     max_commands;
        int     commands_outstanding;