Re: [PATCH 1/3] SCSI: convert to the new PM framework

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

 



On Wed, 2010-06-16 at 14:51 -0400, Alan Stern wrote:
> This patch (as1397) converts the SCSI midlayer to use the new PM
> callbacks (struct dev_pm_ops).  A new source file, scsi_pm.c, is
> created to hold the new callback routines, and the existing
> suspend/resume code is moved there.
> 
> Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 
> ---
> 
> Index: usb-2.6/drivers/scsi/Makefile
> ===================================================================
> --- usb-2.6.orig/drivers/scsi/Makefile
> +++ usb-2.6/drivers/scsi/Makefile
> @@ -158,7 +158,8 @@ obj-$(CONFIG_SCSI_WAIT_SCAN)	+= scsi_wai
>  scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
>  				   scsicam.o scsi_error.o scsi_lib.o
>  scsi_mod-$(CONFIG_SCSI_DMA)	+= scsi_lib_dma.o
> -scsi_mod-y			+= scsi_scan.o scsi_sysfs.o scsi_devinfo.o
> +scsi_mod-y			+= scsi_scan.o scsi_sysfs.o scsi_devinfo.o \
> +				   scsi_pm.o

shouldn't this be

scsi_mod-$(CONFIG_PM_OPS) += scsi_pm.o

?  especially since you guard the whole of the file with the ifdef
otherwise.

>  scsi_mod-$(CONFIG_SCSI_NETLINK)	+= scsi_netlink.o
>  scsi_mod-$(CONFIG_SYSCTL)	+= scsi_sysctl.o
>  scsi_mod-$(CONFIG_SCSI_PROC_FS)	+= scsi_proc.o
> Index: usb-2.6/drivers/scsi/scsi_priv.h
> ===================================================================
> --- usb-2.6.orig/drivers/scsi/scsi_priv.h
> +++ usb-2.6/drivers/scsi/scsi_priv.h
> @@ -144,6 +144,13 @@ static inline void scsi_netlink_init(voi
>  static inline void scsi_netlink_exit(void) {}
>  #endif
>  
> +/* scsi_pm.c */
> +#ifdef CONFIG_PM_OPS
> +extern struct dev_pm_ops scsi_bus_pm_ops;
> +#else
> +#define scsi_bus_pm_ops		(*(struct dev_pm_ops *) NULL)

No need to cast a NULL ... the compiler seems to correctly not warn
about &*NULL

Otherwise seems OK.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux