public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/3] SCSI: convert to the new PM framework
Date: Wed, 16 Jun 2010 14:44:18 -0500	[thread overview]
Message-ID: <1276717458.2847.321.camel@mulgrave.site> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1006161155590.1587-100000@iolanthe.rowland.org>

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@rowland.harvard.edu>
> 
> ---
> 
> 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



  reply	other threads:[~2010-06-16 19:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 18:51 [PATCH 1/3] SCSI: convert to the new PM framework Alan Stern
2010-06-16 19:44 ` James Bottomley [this message]
2010-06-16 20:56   ` Alan Stern
2010-06-17 14:36   ` [PATCH 1/3 ver 2] " Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276717458.2847.321.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox