]> err.no Git - linux-2.6/commitdiff
ide: remove hwif->intrproc
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)
Given that:

* hpt366.c::hpt3xx_intrproc() is the only user of hwif->intrproc

* hpt366.c::hpt3xx_quirkproc() sets drive->quirk_list to 1 for quirky drives
  which is a value unique to hpt366 host driver

we can remove hwif->intproc and just check for drive->quirk_list == 1
in ide_do_request().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
drivers/ide/ide.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/sgiioc4.c
include/linux/ide.h

index 6b70ab9566d90901ea10614ce204d8bdaafee015..6ee7458d34edf8b06cd359edb151c4e1c30d0aa5 100644 (file)
@@ -1200,10 +1200,11 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
                if (hwgroup->hwif->sharing_irq &&
                    hwif != hwgroup->hwif &&
                    hwif->io_ports[IDE_CONTROL_OFFSET]) {
-                       /* set nIEN for previous hwif */
-                       if (hwif->intrproc)
-                               hwif->intrproc(drive);
-                       else
+                       /*
+                        * set nIEN for previous hwif, drives in the
+                        * quirk_list may not like intr setups/cleanups
+                        */
+                       if (drive->quirk_list != 1)
                                hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG);
                }
                hwgroup->hwif = hwif;
index 9ab5458fe950eee798f3371f4e7a0368896d81a6..4acd87e92cca2ff9a7caa1834bd6f900b22f98ca 100644 (file)
@@ -424,7 +424,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
        hwif->reset_poll                = tmp_hwif->reset_poll;
        hwif->pre_reset                 = tmp_hwif->pre_reset;
        hwif->resetproc                 = tmp_hwif->resetproc;
-       hwif->intrproc                  = tmp_hwif->intrproc;
        hwif->maskproc                  = tmp_hwif->maskproc;
        hwif->quirkproc                 = tmp_hwif->quirkproc;
        hwif->busproc                   = tmp_hwif->busproc;
index d3826a66834d370e070ed5ee72b6064b589c82a6..24d645751e0f27855d405bac27d3de03d1ca9f3f 100644 (file)
@@ -736,15 +736,6 @@ static int hpt3xx_quirkproc(ide_drive_t *drive)
        return 0;
 }
 
-static void hpt3xx_intrproc(ide_drive_t *drive)
-{
-       if (drive->quirk_list)
-               return;
-
-       /* drives in the quirk_list may not like intr setups/cleanups */
-       outb(drive->ctl | 2, IDE_CONTROL_REG);
-}
-
 static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
 {
        ide_hwif_t *hwif        = HWIF(drive);
@@ -1298,7 +1289,6 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
        hwif->set_dma_mode      = &hpt3xx_set_mode;
 
        hwif->quirkproc         = &hpt3xx_quirkproc;
-       hwif->intrproc          = &hpt3xx_intrproc;
        hwif->maskproc          = &hpt3xx_maskproc;
        hwif->busproc           = &hpt3xx_busproc;
 
index de820aa58cd0e47057b9a8028d9fd3b8c1bfe515..7e9dade5648d4e13e20df4cb125f5a5351cba4a5 100644 (file)
@@ -582,7 +582,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
        hwif->pre_reset = NULL; /* No HBA specific pre_set needed */
        hwif->resetproc = &sgiioc4_resetproc;/* Reset DMA engine,
                                                clear interrupts */
-       hwif->intrproc = NULL;  /* Enable or Disable interrupt from drive */
        hwif->maskproc = &sgiioc4_maskproc;     /* Mask on/off NIEN register */
        hwif->quirkproc = NULL;
        hwif->busproc = NULL;
index e80351878b8b38d4926a0125f6f290c4fc9d3082..90f83b65eb8f04610019d0011a006dca67635d93 100644 (file)
@@ -524,8 +524,6 @@ typedef struct hwif_s {
        void    (*pre_reset)(ide_drive_t *);
        /* routine to reset controller after a disk reset */
        void    (*resetproc)(ide_drive_t *);
-       /* special interrupt handling for shared pci interrupts */
-       void    (*intrproc)(ide_drive_t *);
        /* special host masking for drive selection */
        void    (*maskproc)(ide_drive_t *, int);
        /* check host's drive quirk list */