This fixes PM driver model type checking for drivers/scsi Signed-off-by: Daniel Drake diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_osm.h linux-dsd/drivers/scsi/aic7xxx/aic79xx_osm.h --- linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_osm.h 2004-12-24 21:35:00.000000000 +0000 +++ linux-dsd/drivers/scsi/aic7xxx/aic79xx_osm.h 2005-02-02 20:31:51.000000000 +0000 @@ -839,16 +839,8 @@ ahd_list_unlock(unsigned long *flags) extern struct pci_driver aic79xx_pci_driver; -typedef enum -{ - AHD_POWER_STATE_D0, - AHD_POWER_STATE_D1, - AHD_POWER_STATE_D2, - AHD_POWER_STATE_D3 -} ahd_power_state; - void ahd_power_state_change(struct ahd_softc *ahd, - ahd_power_state new_state); + pm_message_t new_state); /******************************* PCI Routines *********************************/ int ahd_linux_pci_init(void); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_osm_pci.c linux-dsd/drivers/scsi/aic7xxx/aic79xx_osm_pci.c --- linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2004-12-24 21:34:29.000000000 +0000 +++ linux-dsd/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2005-02-02 20:32:17.000000000 +0000 @@ -362,7 +362,7 @@ ahd_pci_map_int(struct ahd_softc *ahd) } void -ahd_power_state_change(struct ahd_softc *ahd, ahd_power_state new_state) +ahd_power_state_change(struct ahd_softc *ahd, pm_message_t new_state) { pci_set_power_state(ahd->dev_softc, new_state); } diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_pci.c linux-dsd/drivers/scsi/aic7xxx/aic79xx_pci.c --- linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic79xx_pci.c 2004-12-24 21:34:44.000000000 +0000 +++ linux-dsd/drivers/scsi/aic7xxx/aic79xx_pci.c 2005-02-02 20:33:31.000000000 +0000 @@ -313,7 +313,7 @@ ahd_pci_config(struct ahd_softc *ahd, st } ahd->bus_description = pci_bus_modes[PCI_BUS_MODES_INDEX(devconfig)]; - ahd_power_state_change(ahd, AHD_POWER_STATE_D0); + ahd_power_state_change(ahd, PCI_D0); error = ahd_pci_map_registers(ahd); if (error != 0) diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic7xxx_osm.h linux-dsd/drivers/scsi/aic7xxx/aic7xxx_osm.h --- linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic7xxx_osm.h 2005-02-02 21:54:20.000000000 +0000 +++ linux-dsd/drivers/scsi/aic7xxx/aic7xxx_osm.h 2005-02-02 20:36:19.000000000 +0000 @@ -799,14 +799,6 @@ ahc_list_unlock(unsigned long *flags) extern struct pci_driver aic7xxx_pci_driver; -typedef enum -{ - AHC_POWER_STATE_D0, - AHC_POWER_STATE_D1, - AHC_POWER_STATE_D2, - AHC_POWER_STATE_D3 -} ahc_power_state; - /**************************** VL/EISA Routines ********************************/ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) \ && (defined(__i386__) || defined(__alpha__)) \ diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic7xxx_pci.c linux-dsd/drivers/scsi/aic7xxx/aic7xxx_pci.c --- linux-2.6.11-rc2-mm2/drivers/scsi/aic7xxx/aic7xxx_pci.c 2005-02-02 21:54:20.000000000 +0000 +++ linux-dsd/drivers/scsi/aic7xxx/aic7xxx_pci.c 2005-02-02 20:37:05.000000000 +0000 @@ -721,7 +721,7 @@ ahc_pci_config(struct ahc_softc *ahc, st ahc->chip |= AHC_PCI; ahc->description = entry->name; - pci_set_power_state(ahc->dev_softc, AHC_POWER_STATE_D0); + pci_set_power_state(ahc->dev_softc, PCI_D0); error = ahc_pci_map_registers(ahc); if (error != 0) @@ -2016,7 +2016,7 @@ static int ahc_pci_resume(struct ahc_softc *ahc) { - pci_set_power_state(ahc->dev_softc, AHC_POWER_STATE_D0); + pci_set_power_state(ahc->dev_softc, PCI_D0); /* * We assume that the OS has restored our register diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/mesh.c linux-dsd/drivers/scsi/mesh.c --- linux-2.6.11-rc2-mm2/drivers/scsi/mesh.c 2004-12-24 21:35:01.000000000 +0000 +++ linux-dsd/drivers/scsi/mesh.c 2005-02-02 21:57:12.994961576 +0000 @@ -1757,7 +1757,7 @@ static void set_mesh_power(struct mesh_s #ifdef CONFIG_PM -static int mesh_suspend(struct macio_dev *mdev, u32 state) +static int mesh_suspend(struct macio_dev *mdev, pm_message_t state) { struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); unsigned long flags; @@ -1787,7 +1787,7 @@ static int mesh_resume(struct macio_dev struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); unsigned long flags; - if (mdev->ofdev.dev.power.power_state == 0) + if (mdev->ofdev.dev.power.power_state == PMSG_ON) return 0; set_mesh_power(ms, 1); @@ -1798,7 +1798,7 @@ static int mesh_resume(struct macio_dev enable_irq(ms->meshintr); scsi_unblock_requests(ms->host); - mdev->ofdev.dev.power.power_state = 0; + mdev->ofdev.dev.power.power_state = PMSG_ON; return 0; } diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/scsi/nsp32.c linux-dsd/drivers/scsi/nsp32.c --- linux-2.6.11-rc2-mm2/drivers/scsi/nsp32.c 2005-02-02 21:54:20.000000000 +0000 +++ linux-dsd/drivers/scsi/nsp32.c 2005-02-02 20:28:41.000000000 +0000 @@ -3435,7 +3435,7 @@ static int nsp32_prom_read_bit(nsp32_hw_ #ifdef CONFIG_PM /* Device suspended */ -static int nsp32_suspend(struct pci_dev *pdev, u32 state) +static int nsp32_suspend(struct pci_dev *pdev, pm_message_t state) { struct Scsi_Host *host = pci_get_drvdata(pdev); @@ -3443,7 +3443,7 @@ static int nsp32_suspend(struct pci_dev pci_save_state (pdev); pci_disable_device (pdev); - pci_set_power_state(pdev, state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); return 0; } @@ -3457,7 +3457,7 @@ static int nsp32_resume(struct pci_dev * nsp32_msg(KERN_INFO, "pci-resume: pdev=0x%p, slot=%s, host=0x%p", pdev, pci_name(pdev), host); - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); pci_enable_wake (pdev, 0, 0); pci_restore_state (pdev);