[linux-pm] Re: [PATCH 6/8] scsi: PM type checking conversions

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

 



Hi!

> This fixes PM driver model type checking for drivers/scsi
> 
> Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx>

> 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)

This seems wrong. ahd_power_state_change gets pci type, but you
declared it as pm_message_t. This is right, but you probably want to
change it above to pci_power_t....

Otherwise it looks ok.
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux