提交 33139b21 编写于 作者: J Jiri Slaby 提交者: James Bottomley

[SCSI] megaraid_sas: fix suspend/resume sections

megaraid_sas suspend and resume are inappropriatelly placed in
__devinit section. Remove those placements and make the stuff
dependent on CONFIG_PM.

While at it, mark remove function as __devexit.
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Acked-by: N"Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 655d722c
...@@ -2650,12 +2650,13 @@ static void megasas_shutdown_controller(struct megasas_instance *instance, ...@@ -2650,12 +2650,13 @@ static void megasas_shutdown_controller(struct megasas_instance *instance,
return; return;
} }
#ifdef CONFIG_PM
/** /**
* megasas_suspend - driver suspend entry point * megasas_suspend - driver suspend entry point
* @pdev: PCI device structure * @pdev: PCI device structure
* @state: PCI power state to suspend routine * @state: PCI power state to suspend routine
*/ */
static int __devinit static int
megasas_suspend(struct pci_dev *pdev, pm_message_t state) megasas_suspend(struct pci_dev *pdev, pm_message_t state)
{ {
struct Scsi_Host *host; struct Scsi_Host *host;
...@@ -2687,7 +2688,7 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -2687,7 +2688,7 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state)
* megasas_resume- driver resume entry point * megasas_resume- driver resume entry point
* @pdev: PCI device structure * @pdev: PCI device structure
*/ */
static int __devinit static int
megasas_resume(struct pci_dev *pdev) megasas_resume(struct pci_dev *pdev)
{ {
int rval; int rval;
...@@ -2782,12 +2783,16 @@ megasas_resume(struct pci_dev *pdev) ...@@ -2782,12 +2783,16 @@ megasas_resume(struct pci_dev *pdev)
return -ENODEV; return -ENODEV;
} }
#else
#define megasas_suspend NULL
#define megasas_resume NULL
#endif
/** /**
* megasas_detach_one - PCI hot"un"plug entry point * megasas_detach_one - PCI hot"un"plug entry point
* @pdev: PCI device structure * @pdev: PCI device structure
*/ */
static void megasas_detach_one(struct pci_dev *pdev) static void __devexit megasas_detach_one(struct pci_dev *pdev)
{ {
int i; int i;
struct Scsi_Host *host; struct Scsi_Host *host;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册