Re: [PATCH v2] ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers

2014-05-09 Thread Tejun Heo
On Wed, May 07, 2014 at 05:17:44PM +0200, Bartlomiej Zolnierkiewicz wrote:
> This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
> where applicable.  Benefits of this change:
> 
> * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
>   and CONFIG_PM_RUNTIME=y configurations
> 
> * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
>   the future
> 
> * more consistent code (there are host drivers which are using the correct
>   CONFIG_PM_SLEEP checks already)
> 
> The patch leaves the core libata code and ->port_[suspend,resume] support
> in sata_[inic162x,nv,sil24].c alone for now.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

Applied to libata/for-3.16.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers

2014-05-09 Thread Tejun Heo
On Wed, May 07, 2014 at 05:17:44PM +0200, Bartlomiej Zolnierkiewicz wrote:
 This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
 where applicable.  Benefits of this change:
 
 * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
   and CONFIG_PM_RUNTIME=y configurations
 
 * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
   the future
 
 * more consistent code (there are host drivers which are using the correct
   CONFIG_PM_SLEEP checks already)
 
 The patch leaves the core libata code and -port_[suspend,resume] support
 in sata_[inic162x,nv,sil24].c alone for now.
 
 Signed-off-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com

Applied to libata/for-3.16.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers

2014-05-07 Thread Bartlomiej Zolnierkiewicz
This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
where applicable.  Benefits of this change:

* unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
  and CONFIG_PM_RUNTIME=y configurations

* easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
  the future

* more consistent code (there are host drivers which are using the correct
  CONFIG_PM_SLEEP checks already)

The patch leaves the core libata code and ->port_[suspend,resume] support
in sata_[inic162x,nv,sil24].c alone for now.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2:
- fix patch description

 drivers/ata/acard-ahci.c|  6 +++---
 drivers/ata/ata_generic.c   |  2 +-
 drivers/ata/ata_piix.c  |  4 ++--
 drivers/ata/pata_acpi.c |  2 +-
 drivers/ata/pata_ali.c  |  4 ++--
 drivers/ata/pata_amd.c  |  4 ++--
 drivers/ata/pata_artop.c|  4 ++--
 drivers/ata/pata_atiixp.c   |  2 +-
 drivers/ata/pata_atp867x.c  |  4 ++--
 drivers/ata/pata_bf54x.c|  2 +-
 drivers/ata/pata_cmd640.c   |  4 ++--
 drivers/ata/pata_cmd64x.c   |  4 ++--
 drivers/ata/pata_cs5520.c   |  6 +++---
 drivers/ata/pata_cs5530.c   |  6 +++---
 drivers/ata/pata_cs5535.c   |  2 +-
 drivers/ata/pata_cs5536.c   |  2 +-
 drivers/ata/pata_cypress.c  |  2 +-
 drivers/ata/pata_efar.c |  2 +-
 drivers/ata/pata_hpt366.c   |  4 ++--
 drivers/ata/pata_hpt3x3.c   |  4 ++--
 drivers/ata/pata_imx.c  |  4 ++--
 drivers/ata/pata_it8213.c   |  2 +-
 drivers/ata/pata_it821x.c   |  4 ++--
 drivers/ata/pata_jmicron.c  |  2 +-
 drivers/ata/pata_macio.c| 22 --
 drivers/ata/pata_marvell.c  |  2 +-
 drivers/ata/pata_mpc52xx.c  |  8 ++--
 drivers/ata/pata_mpiix.c|  2 +-
 drivers/ata/pata_netcell.c  |  2 +-
 drivers/ata/pata_ninja32.c  |  5 ++---
 drivers/ata/pata_ns87410.c  |  2 +-
 drivers/ata/pata_ns87415.c  |  4 ++--
 drivers/ata/pata_oldpiix.c  |  2 +-
 drivers/ata/pata_opti.c |  2 +-
 drivers/ata/pata_optidma.c  |  2 +-
 drivers/ata/pata_pdc2027x.c |  6 +++---
 drivers/ata/pata_pdc202xx_old.c |  2 +-
 drivers/ata/pata_piccolo.c  |  2 +-
 drivers/ata/pata_radisys.c  |  2 +-
 drivers/ata/pata_rdc.c  |  2 +-
 drivers/ata/pata_rz1000.c   |  4 ++--
 drivers/ata/pata_samsung_cf.c   |  4 ++--
 drivers/ata/pata_sc1200.c   |  2 +-
 drivers/ata/pata_scc.c  |  2 +-
 drivers/ata/pata_sch.c  |  2 +-
 drivers/ata/pata_serverworks.c  |  4 ++--
 drivers/ata/pata_sil680.c   |  4 ++--
 drivers/ata/pata_sis.c  |  4 ++--
 drivers/ata/pata_sl82c105.c |  4 ++--
 drivers/ata/pata_triflex.c  |  4 ++--
 drivers/ata/pata_via.c  |  4 ++--
 drivers/ata/sata_fsl.c  |  4 ++--
 drivers/ata/sata_inic162x.c |  4 ++--
 drivers/ata/sata_mv.c   |  8 
 drivers/ata/sata_nv.c   |  6 +++---
 drivers/ata/sata_rcar.c |  4 ++--
 drivers/ata/sata_sil.c  |  6 +++---
 drivers/ata/sata_sil24.c| 10 +++---
 drivers/ata/sata_sis.c  |  2 +-
 drivers/ata/sata_via.c  |  2 +-
 60 files changed, 113 insertions(+), 120 deletions(-)

diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c
index b51605a..0cd7c7a 100644
--- a/drivers/ata/acard-ahci.c
+++ b/drivers/ata/acard-ahci.c
@@ -77,7 +77,7 @@ static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
 static int acard_ahci_port_start(struct ata_port *ap);
 static int acard_ahci_init_one(struct pci_dev *pdev, const struct 
pci_device_id *ent);
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t 
mesg);
 static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
 #endif
@@ -118,13 +118,13 @@ static struct pci_driver acard_ahci_pci_driver = {
.id_table   = acard_ahci_pci_tbl,
.probe  = acard_ahci_init_one,
.remove = ata_pci_remove_one,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend= acard_ahci_pci_device_suspend,
.resume = acard_ahci_pci_device_resume,
 #endif
 };
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t 
mesg)
 {
struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 9498a7d..9ff545c 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -241,7 +241,7 @@ static struct pci_driver ata_generic_pci_driver = {
.id_table   = ata_generic,
.probe  = ata_generic_init_one,
.remove = ata_pci_remove_one,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend= ata_pci_device_suspend,
.resume = ata_pci_device_resume,
 #endif
diff --git a/drivers/ata/ata_piix.c 

[PATCH v2] ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers

2014-05-07 Thread Bartlomiej Zolnierkiewicz
This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
where applicable.  Benefits of this change:

* unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
  and CONFIG_PM_RUNTIME=y configurations

* easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
  the future

* more consistent code (there are host drivers which are using the correct
  CONFIG_PM_SLEEP checks already)

The patch leaves the core libata code and -port_[suspend,resume] support
in sata_[inic162x,nv,sil24].c alone for now.

Signed-off-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
---
v2:
- fix patch description

 drivers/ata/acard-ahci.c|  6 +++---
 drivers/ata/ata_generic.c   |  2 +-
 drivers/ata/ata_piix.c  |  4 ++--
 drivers/ata/pata_acpi.c |  2 +-
 drivers/ata/pata_ali.c  |  4 ++--
 drivers/ata/pata_amd.c  |  4 ++--
 drivers/ata/pata_artop.c|  4 ++--
 drivers/ata/pata_atiixp.c   |  2 +-
 drivers/ata/pata_atp867x.c  |  4 ++--
 drivers/ata/pata_bf54x.c|  2 +-
 drivers/ata/pata_cmd640.c   |  4 ++--
 drivers/ata/pata_cmd64x.c   |  4 ++--
 drivers/ata/pata_cs5520.c   |  6 +++---
 drivers/ata/pata_cs5530.c   |  6 +++---
 drivers/ata/pata_cs5535.c   |  2 +-
 drivers/ata/pata_cs5536.c   |  2 +-
 drivers/ata/pata_cypress.c  |  2 +-
 drivers/ata/pata_efar.c |  2 +-
 drivers/ata/pata_hpt366.c   |  4 ++--
 drivers/ata/pata_hpt3x3.c   |  4 ++--
 drivers/ata/pata_imx.c  |  4 ++--
 drivers/ata/pata_it8213.c   |  2 +-
 drivers/ata/pata_it821x.c   |  4 ++--
 drivers/ata/pata_jmicron.c  |  2 +-
 drivers/ata/pata_macio.c| 22 --
 drivers/ata/pata_marvell.c  |  2 +-
 drivers/ata/pata_mpc52xx.c  |  8 ++--
 drivers/ata/pata_mpiix.c|  2 +-
 drivers/ata/pata_netcell.c  |  2 +-
 drivers/ata/pata_ninja32.c  |  5 ++---
 drivers/ata/pata_ns87410.c  |  2 +-
 drivers/ata/pata_ns87415.c  |  4 ++--
 drivers/ata/pata_oldpiix.c  |  2 +-
 drivers/ata/pata_opti.c |  2 +-
 drivers/ata/pata_optidma.c  |  2 +-
 drivers/ata/pata_pdc2027x.c |  6 +++---
 drivers/ata/pata_pdc202xx_old.c |  2 +-
 drivers/ata/pata_piccolo.c  |  2 +-
 drivers/ata/pata_radisys.c  |  2 +-
 drivers/ata/pata_rdc.c  |  2 +-
 drivers/ata/pata_rz1000.c   |  4 ++--
 drivers/ata/pata_samsung_cf.c   |  4 ++--
 drivers/ata/pata_sc1200.c   |  2 +-
 drivers/ata/pata_scc.c  |  2 +-
 drivers/ata/pata_sch.c  |  2 +-
 drivers/ata/pata_serverworks.c  |  4 ++--
 drivers/ata/pata_sil680.c   |  4 ++--
 drivers/ata/pata_sis.c  |  4 ++--
 drivers/ata/pata_sl82c105.c |  4 ++--
 drivers/ata/pata_triflex.c  |  4 ++--
 drivers/ata/pata_via.c  |  4 ++--
 drivers/ata/sata_fsl.c  |  4 ++--
 drivers/ata/sata_inic162x.c |  4 ++--
 drivers/ata/sata_mv.c   |  8 
 drivers/ata/sata_nv.c   |  6 +++---
 drivers/ata/sata_rcar.c |  4 ++--
 drivers/ata/sata_sil.c  |  6 +++---
 drivers/ata/sata_sil24.c| 10 +++---
 drivers/ata/sata_sis.c  |  2 +-
 drivers/ata/sata_via.c  |  2 +-
 60 files changed, 113 insertions(+), 120 deletions(-)

diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c
index b51605a..0cd7c7a 100644
--- a/drivers/ata/acard-ahci.c
+++ b/drivers/ata/acard-ahci.c
@@ -77,7 +77,7 @@ static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
 static int acard_ahci_port_start(struct ata_port *ap);
 static int acard_ahci_init_one(struct pci_dev *pdev, const struct 
pci_device_id *ent);
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t 
mesg);
 static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
 #endif
@@ -118,13 +118,13 @@ static struct pci_driver acard_ahci_pci_driver = {
.id_table   = acard_ahci_pci_tbl,
.probe  = acard_ahci_init_one,
.remove = ata_pci_remove_one,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend= acard_ahci_pci_device_suspend,
.resume = acard_ahci_pci_device_resume,
 #endif
 };
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t 
mesg)
 {
struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 9498a7d..9ff545c 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -241,7 +241,7 @@ static struct pci_driver ata_generic_pci_driver = {
.id_table   = ata_generic,
.probe  = ata_generic_init_one,
.remove = ata_pci_remove_one,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend= ata_pci_device_suspend,
.resume = ata_pci_device_resume,
 #endif
diff --git