* [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner
@ 2014-08-12 16:14 Peter Griffin
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, michal.simek, swarren
Cc: peter.griffin, patches, lee.jones
This series cleans up a few platform drivers in how they are declaring there
dev_pm_ops structs, and gets rid of a few now redundant #else conditions.
Also it removes the .owner field of drivers which use module_platform_driver
api to register themselves, as this field gets overwritten.
Peter Griffin (5):
mmc: remove .owner field for drivers using module_platform_driver
mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP
mmc: dw_mmc-pltfm: Remove superflous #else condition on
CONFIG_PM_SLEEP
mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm
callbacks
mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm
callbacks
drivers/mmc/host/dw_mmc-pci.c | 3 ---
drivers/mmc/host/dw_mmc-pltfm.c | 3 ---
drivers/mmc/host/jz4740_mmc.c | 1 -
drivers/mmc/host/moxart-mmc.c | 1 -
drivers/mmc/host/mxcmmc.c | 1 -
drivers/mmc/host/mxs-mmc.c | 1 -
drivers/mmc/host/omap.c | 1 -
drivers/mmc/host/omap_hsmmc.c | 1 -
drivers/mmc/host/pxamci.c | 1 -
drivers/mmc/host/rtsx_pci_sdmmc.c | 1 -
drivers/mmc/host/rtsx_usb_sdmmc.c | 1 -
drivers/mmc/host/s3cmci.c | 1 -
drivers/mmc/host/sdhci-acpi.c | 11 ++---------
drivers/mmc/host/sdhci-bcm-kona.c | 1 -
drivers/mmc/host/sdhci-bcm2835.c | 1 -
drivers/mmc/host/sdhci-cns3xxx.c | 1 -
drivers/mmc/host/sdhci-dove.c | 1 -
drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
drivers/mmc/host/sdhci-msm.c | 1 -
drivers/mmc/host/sdhci-of-arasan.c | 1 -
drivers/mmc/host/sdhci-of-esdhc.c | 1 -
drivers/mmc/host/sdhci-of-hlwd.c | 1 -
drivers/mmc/host/sdhci-pci.c | 11 ++---------
drivers/mmc/host/sdhci-pxav2.c | 1 -
drivers/mmc/host/sdhci-pxav3.c | 1 -
drivers/mmc/host/sdhci-s3c.c | 1 -
drivers/mmc/host/sdhci-sirf.c | 1 -
drivers/mmc/host/sdhci-spear.c | 1 -
drivers/mmc/host/sdhci-tegra.c | 1 -
drivers/mmc/host/sh_mmcif.c | 1 -
drivers/mmc/host/sh_mobile_sdhi.c | 1 -
drivers/mmc/host/sunxi-mmc.c | 1 -
32 files changed, 4 insertions(+), 52 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
@ 2014-08-12 16:14 ` Peter Griffin
2014-08-18 14:19 ` Michal Simek
2014-08-12 16:14 ` [PATCH 2/5] mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP Peter Griffin
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, michal.simek, swarren
Cc: peter.griffin, patches, lee.jones
This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/mmc/host/jz4740_mmc.c | 1 -
drivers/mmc/host/moxart-mmc.c | 1 -
drivers/mmc/host/mxcmmc.c | 1 -
drivers/mmc/host/mxs-mmc.c | 1 -
drivers/mmc/host/omap.c | 1 -
drivers/mmc/host/omap_hsmmc.c | 1 -
drivers/mmc/host/pxamci.c | 1 -
drivers/mmc/host/rtsx_pci_sdmmc.c | 1 -
drivers/mmc/host/rtsx_usb_sdmmc.c | 1 -
drivers/mmc/host/s3cmci.c | 1 -
drivers/mmc/host/sdhci-bcm-kona.c | 1 -
drivers/mmc/host/sdhci-bcm2835.c | 1 -
drivers/mmc/host/sdhci-cns3xxx.c | 1 -
drivers/mmc/host/sdhci-dove.c | 1 -
drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
drivers/mmc/host/sdhci-msm.c | 1 -
drivers/mmc/host/sdhci-of-arasan.c | 1 -
drivers/mmc/host/sdhci-of-esdhc.c | 1 -
drivers/mmc/host/sdhci-of-hlwd.c | 1 -
drivers/mmc/host/sdhci-pxav2.c | 1 -
drivers/mmc/host/sdhci-pxav3.c | 1 -
drivers/mmc/host/sdhci-s3c.c | 1 -
drivers/mmc/host/sdhci-sirf.c | 1 -
drivers/mmc/host/sdhci-spear.c | 1 -
drivers/mmc/host/sdhci-tegra.c | 1 -
drivers/mmc/host/sh_mmcif.c | 1 -
drivers/mmc/host/sh_mobile_sdhi.c | 1 -
drivers/mmc/host/sunxi-mmc.c | 1 -
28 files changed, 28 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 537d6c7..e89b37d 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -909,7 +909,6 @@ static struct platform_driver jz4740_mmc_driver = {
.remove = jz4740_mmc_remove,
.driver = {
.name = "jz4740-mmc",
- .owner = THIS_MODULE,
.pm = JZ4740_MMC_PM_OPS,
},
};
diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index 74924a0..e9f909e 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -718,7 +718,6 @@ static struct platform_driver moxart_mmc_driver = {
.remove = moxart_remove,
.driver = {
.name = "mmc-moxart",
- .owner = THIS_MODULE,
.of_match_table = moxart_mmc_match,
},
};
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index ed1cb93..ad11142 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -1238,7 +1238,6 @@ static struct platform_driver mxcmci_driver = {
.id_table = mxcmci_devtype,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
.pm = &mxcmci_pm_ops,
.of_match_table = mxcmci_of_match,
}
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index babfea0..d7db40b 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -734,7 +734,6 @@ static struct platform_driver mxs_mmc_driver = {
.id_table = mxs_ssp_ids,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &mxs_mmc_pm_ops,
#endif
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 81974ec..68dd6c7 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1494,7 +1494,6 @@ static struct platform_driver mmc_omap_driver = {
.remove = mmc_omap_remove,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
.of_match_table = of_match_ptr(mmc_omap_match),
},
};
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 6b7b755..3508121 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2248,7 +2248,6 @@ static struct platform_driver omap_hsmmc_driver = {
.remove = omap_hsmmc_remove,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
.pm = &omap_hsmmc_dev_pm_ops,
.of_match_table = of_match_ptr(omap_mmc_of_match),
},
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 32fe113..0971a23 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -885,7 +885,6 @@ static struct platform_driver pxamci_driver = {
.remove = pxamci_remove,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
.of_match_table = of_match_ptr(pxa_mmc_dt_ids),
},
};
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 0d51964..6b21982 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1295,7 +1295,6 @@ static struct platform_driver rtsx_pci_sdmmc_driver = {
.remove = rtsx_pci_sdmmc_drv_remove,
.id_table = rtsx_pci_sdmmc_ids,
.driver = {
- .owner = THIS_MODULE,
.name = DRV_NAME_RTSX_PCI_SDMMC,
},
};
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 5d3766e..469b383 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1445,7 +1445,6 @@ static struct platform_driver rtsx_usb_sdmmc_driver = {
.remove = rtsx_usb_sdmmc_drv_remove,
.id_table = rtsx_usb_sdmmc_ids,
.driver = {
- .owner = THIS_MODULE,
.name = "rtsx_usb_sdmmc",
},
};
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index f237826..2260d72 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1954,7 +1954,6 @@ MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
static struct platform_driver s3cmci_driver = {
.driver = {
.name = "s3c-sdi",
- .owner = THIS_MODULE,
},
.id_table = s3cmci_driver_ids,
.probe = s3cmci_probe,
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index dd780c3..2245988 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -359,7 +359,6 @@ static int sdhci_bcm_kona_remove(struct platform_device *pdev)
static struct platform_driver sdhci_bcm_kona_driver = {
.driver = {
.name = "sdhci-kona",
- .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
.of_match_table = sdhci_bcm_kona_of_match,
},
diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c
index 46af9a4..439d259 100644
--- a/drivers/mmc/host/sdhci-bcm2835.c
+++ b/drivers/mmc/host/sdhci-bcm2835.c
@@ -194,7 +194,6 @@ MODULE_DEVICE_TABLE(of, bcm2835_sdhci_of_match);
static struct platform_driver bcm2835_sdhci_driver = {
.driver = {
.name = "sdhci-bcm2835",
- .owner = THIS_MODULE,
.of_match_table = bcm2835_sdhci_of_match,
.pm = SDHCI_PLTFM_PMOPS,
},
diff --git a/drivers/mmc/host/sdhci-cns3xxx.c b/drivers/mmc/host/sdhci-cns3xxx.c
index 14b7407..a7935a8 100644
--- a/drivers/mmc/host/sdhci-cns3xxx.c
+++ b/drivers/mmc/host/sdhci-cns3xxx.c
@@ -106,7 +106,6 @@ static int sdhci_cns3xxx_remove(struct platform_device *pdev)
static struct platform_driver sdhci_cns3xxx_driver = {
.driver = {
.name = "sdhci-cns3xxx",
- .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
},
.probe = sdhci_cns3xxx_probe,
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index e6278ec..ca969d2 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -146,7 +146,6 @@ MODULE_DEVICE_TABLE(of, sdhci_dove_of_match_table);
static struct platform_driver sdhci_dove_driver = {
.driver = {
.name = "sdhci-dove",
- .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
.of_match_table = sdhci_dove_of_match_table,
},
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ccec0e3..46677f0 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1207,7 +1207,6 @@ static const struct dev_pm_ops sdhci_esdhc_pmops = {
static struct platform_driver sdhci_esdhc_imx_driver = {
.driver = {
.name = "sdhci-esdhc-imx",
- .owner = THIS_MODULE,
.of_match_table = imx_esdhc_dt_ids,
.pm = &sdhci_esdhc_pmops,
},
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 40573a5..fbffc75 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -611,7 +611,6 @@ static struct platform_driver sdhci_msm_driver = {
.remove = sdhci_msm_remove,
.driver = {
.name = "sdhci_msm",
- .owner = THIS_MODULE,
.of_match_table = sdhci_msm_dt_match,
},
};
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 5bd1092..981d66e 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -213,7 +213,6 @@ MODULE_DEVICE_TABLE(of, sdhci_arasan_of_match);
static struct platform_driver sdhci_arasan_driver = {
.driver = {
.name = "sdhci-arasan",
- .owner = THIS_MODULE,
.of_match_table = sdhci_arasan_of_match,
.pm = &sdhci_arasan_dev_pm_ops,
},
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 8be4dcf..8872c85 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -388,7 +388,6 @@ MODULE_DEVICE_TABLE(of, sdhci_esdhc_of_match);
static struct platform_driver sdhci_esdhc_driver = {
.driver = {
.name = "sdhci-esdhc",
- .owner = THIS_MODULE,
.of_match_table = sdhci_esdhc_of_match,
.pm = ESDHC_PMOPS,
},
diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c
index b341661..be47927 100644
--- a/drivers/mmc/host/sdhci-of-hlwd.c
+++ b/drivers/mmc/host/sdhci-of-hlwd.c
@@ -89,7 +89,6 @@ MODULE_DEVICE_TABLE(of, sdhci_hlwd_of_match);
static struct platform_driver sdhci_hlwd_driver = {
.driver = {
.name = "sdhci-hlwd",
- .owner = THIS_MODULE,
.of_match_table = sdhci_hlwd_of_match,
.pm = SDHCI_PLTFM_PMOPS,
},
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
index 3c0f3c0..b4c23e9 100644
--- a/drivers/mmc/host/sdhci-pxav2.c
+++ b/drivers/mmc/host/sdhci-pxav2.c
@@ -261,7 +261,6 @@ static int sdhci_pxav2_remove(struct platform_device *pdev)
static struct platform_driver sdhci_pxav2_driver = {
.driver = {
.name = "sdhci-pxav2",
- .owner = THIS_MODULE,
#ifdef CONFIG_OF
.of_match_table = sdhci_pxav2_of_match,
#endif
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index f4f1289..95ccadf 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -499,7 +499,6 @@ static struct platform_driver sdhci_pxav3_driver = {
#ifdef CONFIG_OF
.of_match_table = sdhci_pxav3_of_match,
#endif
- .owner = THIS_MODULE,
.pm = SDHCI_PXAV3_PMOPS,
},
.probe = sdhci_pxav3_probe,
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index fa5954a..2777e33 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -747,7 +747,6 @@ static struct platform_driver sdhci_s3c_driver = {
.remove = sdhci_s3c_remove,
.id_table = sdhci_s3c_driver_ids,
.driver = {
- .owner = THIS_MODULE,
.name = "s3c-sdhci",
.of_match_table = of_match_ptr(sdhci_s3c_dt_match),
.pm = SDHCI_S3C_PMOPS,
diff --git a/drivers/mmc/host/sdhci-sirf.c b/drivers/mmc/host/sdhci-sirf.c
index 1700453..e15dc89 100644
--- a/drivers/mmc/host/sdhci-sirf.c
+++ b/drivers/mmc/host/sdhci-sirf.c
@@ -167,7 +167,6 @@ MODULE_DEVICE_TABLE(of, sdhci_sirf_of_match);
static struct platform_driver sdhci_sirf_driver = {
.driver = {
.name = "sdhci-sirf",
- .owner = THIS_MODULE,
.of_match_table = sdhci_sirf_of_match,
#ifdef CONFIG_PM_SLEEP
.pm = &sdhci_sirf_pm_ops,
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 9d535c7..22e5826 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -230,7 +230,6 @@ MODULE_DEVICE_TABLE(of, sdhci_spear_id_table);
static struct platform_driver sdhci_driver = {
.driver = {
.name = "sdhci",
- .owner = THIS_MODULE,
.pm = &sdhci_pm_ops,
.of_match_table = of_match_ptr(sdhci_spear_id_table),
},
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index d93a063..9ef9e43 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -320,7 +320,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev)
static struct platform_driver sdhci_tegra_driver = {
.driver = {
.name = "sdhci-tegra",
- .owner = THIS_MODULE,
.of_match_table = sdhci_tegra_dt_match,
.pm = SDHCI_PLTFM_PMOPS,
},
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 656fbba..6a01d59 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1573,7 +1573,6 @@ static struct platform_driver sh_mmcif_driver = {
.driver = {
.name = DRIVER_NAME,
.pm = &sh_mmcif_dev_pm_ops,
- .owner = THIS_MODULE,
.of_match_table = mmcif_of_match,
},
};
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 91058da..be5e25d 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -341,7 +341,6 @@ static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
static struct platform_driver sh_mobile_sdhi_driver = {
.driver = {
.name = "sh_mobile_sdhi",
- .owner = THIS_MODULE,
.pm = &tmio_mmc_dev_pm_ops,
.of_match_table = sh_mobile_sdhi_of_match,
},
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 024f67c..dafe500 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1035,7 +1035,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev)
static struct platform_driver sunxi_mmc_driver = {
.driver = {
.name = "sunxi-mmc",
- .owner = THIS_MODULE,
.of_match_table = of_match_ptr(sunxi_mmc_of_match),
},
.probe = sunxi_mmc_probe,
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
@ 2014-08-12 16:14 ` Peter Griffin
2014-08-12 16:14 ` [PATCH 3/5] mmc: dw_mmc-pltfm: " Peter Griffin
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, michal.simek, swarren
Cc: peter.griffin, lee.jones, patches
As the code is using SIMPLE_DEV_PM_OPS helper, this compiles away to
nothing if CONFIG_PM_SLEEP is disabled. Thus we don't need to #define
the suspend/resume callbacks to NULL.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/mmc/host/dw_mmc-pci.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index f70546a..5523b84 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -95,9 +95,6 @@ static int dw_mci_pci_resume(struct device *dev)
return dw_mci_resume(host);
}
-#else
-#define dw_mci_pci_suspend NULL
-#define dw_mci_pci_resume NULL
#endif /* CONFIG_PM_SLEEP */
static SIMPLE_DEV_PM_OPS(dw_mci_pci_pmops, dw_mci_pci_suspend, dw_mci_pci_resume);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] mmc: dw_mmc-pltfm: Remove superflous #else condition on CONFIG_PM_SLEEP
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
2014-08-12 16:14 ` [PATCH 2/5] mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP Peter Griffin
@ 2014-08-12 16:14 ` Peter Griffin
[not found] ` <1407860069-12706-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-12 16:14 ` [PATCH 5/5] mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Peter Griffin
4 siblings, 0 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, michal.simek, swarren
Cc: peter.griffin, patches, lee.jones
As the code is using SIMPLE_DEV_PM_OPS helper, this compiles away to
nothing if CONFIG_PM_SLEEP is disabled. Thus we don't need to #define
the suspend/resume callbacks to NULL.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/mmc/host/dw_mmc-pltfm.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index d4a47a9..fbcb5a3 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -84,9 +84,6 @@ static int dw_mci_pltfm_resume(struct device *dev)
return dw_mci_resume(host);
}
-#else
-#define dw_mci_pltfm_suspend NULL
-#define dw_mci_pltfm_resume NULL
#endif /* CONFIG_PM_SLEEP */
SIMPLE_DEV_PM_OPS(dw_mci_pltfm_pmops, dw_mci_pltfm_suspend, dw_mci_pltfm_resume);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks
[not found] ` <1407860069-12706-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2014-08-12 16:14 ` Peter Griffin
2014-08-18 12:38 ` [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Ulf Hansson
1 sibling, 0 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
tgih.jun-Sze3O3UU22JBDgjK7y7TUQ,
jh80.chung-Sze3O3UU22JBDgjK7y7TUQ, chris-OsFVWbfNK3isTnJN9+BGXg,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A,
jarkko.lavinen-xNZwKgViW5gAvxtiuMwx3w, balajitk-l0cyMroinI0,
baohua-DgEjT+Ai2ygdnm+yROfE0A,
viresh.linux-Re5JQEeQqe8AvxtiuMwx3w,
ian.molton-4yDnlxn2s6sWdaTGBSpHTA,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
michal.simek-gjFFaj9aHVfQT0dZR+AlfA,
swarren-3lzwWm7+Weoh9ZMKESR00Q
Cc: peter.griffin-QSEj5FYQhm4dnm+yROfE0A,
patches-QSEj5FYQhm4dnm+yROfE0A, lee.jones-QSEj5FYQhm4dnm+yROfE0A
This allows us to get rid of the #else condition, as the macro compiles
away to nothing if not enabled.
Signed-off-by: Peter Griffin <peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/mmc/host/sdhci-pci.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 52c42fc..745629d 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -1267,20 +1267,13 @@ static int sdhci_pci_runtime_idle(struct device *dev)
return 0;
}
-#else
-
-#define sdhci_pci_runtime_suspend NULL
-#define sdhci_pci_runtime_resume NULL
-#define sdhci_pci_runtime_idle NULL
-
#endif
static const struct dev_pm_ops sdhci_pci_pm_ops = {
.suspend = sdhci_pci_suspend,
.resume = sdhci_pci_resume,
- .runtime_suspend = sdhci_pci_runtime_suspend,
- .runtime_resume = sdhci_pci_runtime_resume,
- .runtime_idle = sdhci_pci_runtime_idle,
+ SET_RUNTIME_PM_OPS(sdhci_pci_runtime_suspend,
+ sdhci_pci_runtime_resume, sdhci_pci_runtime_idle)
};
/*****************************************************************************\
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
` (3 preceding siblings ...)
[not found] ` <1407860069-12706-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2014-08-12 16:14 ` Peter Griffin
4 siblings, 0 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-12 16:14 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, michal.simek, swarren
Cc: peter.griffin, patches, lee.jones
This allows us to get rid of the #else condition, as the macro compiles
away to nothing if not enabled.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/mmc/host/sdhci-acpi.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 8ce3c28..3a42540 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -383,20 +383,13 @@ static int sdhci_acpi_runtime_idle(struct device *dev)
return 0;
}
-#else
-
-#define sdhci_acpi_runtime_suspend NULL
-#define sdhci_acpi_runtime_resume NULL
-#define sdhci_acpi_runtime_idle NULL
-
#endif
static const struct dev_pm_ops sdhci_acpi_pm_ops = {
.suspend = sdhci_acpi_suspend,
.resume = sdhci_acpi_resume,
- .runtime_suspend = sdhci_acpi_runtime_suspend,
- .runtime_resume = sdhci_acpi_runtime_resume,
- .runtime_idle = sdhci_acpi_runtime_idle,
+ SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend,
+ sdhci_acpi_runtime_resume, sdhci_acpi_runtime_idle)
};
static struct platform_driver sdhci_acpi_driver = {
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner
[not found] ` <1407860069-12706-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-12 16:14 ` [PATCH 4/5] mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Peter Griffin
@ 2014-08-18 12:38 ` Ulf Hansson
1 sibling, 0 replies; 9+ messages in thread
From: Ulf Hansson @ 2014-08-18 12:38 UTC (permalink / raw)
To: Peter Griffin
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
tgih.jun-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, Jaehoon Chung,
Chris Ball, jarkko.lavinen-xNZwKgViW5gAvxtiuMwx3w, balajitk,
Barry Song, Viresh Kumar, Ian Molton, Maxime Ripard, linux-mmc,
linux-omap, spear-devel-nkJGhpqTU55BDgjK7y7TUQ,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Simek,
Stephen Warren, Patch Tracking, Lee Jones
On 12 August 2014 18:14, Peter Griffin <peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> This series cleans up a few platform drivers in how they are declaring there
> dev_pm_ops structs, and gets rid of a few now redundant #else conditions.
>
> Also it removes the .owner field of drivers which use module_platform_driver
> api to register themselves, as this field gets overwritten.
>
> Peter Griffin (5):
> mmc: remove .owner field for drivers using module_platform_driver
> mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP
> mmc: dw_mmc-pltfm: Remove superflous #else condition on
> CONFIG_PM_SLEEP
> mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm
> callbacks
> mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm
> callbacks
Thanks! Applied for next!
Kind regards
Uffe
>
> drivers/mmc/host/dw_mmc-pci.c | 3 ---
> drivers/mmc/host/dw_mmc-pltfm.c | 3 ---
> drivers/mmc/host/jz4740_mmc.c | 1 -
> drivers/mmc/host/moxart-mmc.c | 1 -
> drivers/mmc/host/mxcmmc.c | 1 -
> drivers/mmc/host/mxs-mmc.c | 1 -
> drivers/mmc/host/omap.c | 1 -
> drivers/mmc/host/omap_hsmmc.c | 1 -
> drivers/mmc/host/pxamci.c | 1 -
> drivers/mmc/host/rtsx_pci_sdmmc.c | 1 -
> drivers/mmc/host/rtsx_usb_sdmmc.c | 1 -
> drivers/mmc/host/s3cmci.c | 1 -
> drivers/mmc/host/sdhci-acpi.c | 11 ++---------
> drivers/mmc/host/sdhci-bcm-kona.c | 1 -
> drivers/mmc/host/sdhci-bcm2835.c | 1 -
> drivers/mmc/host/sdhci-cns3xxx.c | 1 -
> drivers/mmc/host/sdhci-dove.c | 1 -
> drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
> drivers/mmc/host/sdhci-msm.c | 1 -
> drivers/mmc/host/sdhci-of-arasan.c | 1 -
> drivers/mmc/host/sdhci-of-esdhc.c | 1 -
> drivers/mmc/host/sdhci-of-hlwd.c | 1 -
> drivers/mmc/host/sdhci-pci.c | 11 ++---------
> drivers/mmc/host/sdhci-pxav2.c | 1 -
> drivers/mmc/host/sdhci-pxav3.c | 1 -
> drivers/mmc/host/sdhci-s3c.c | 1 -
> drivers/mmc/host/sdhci-sirf.c | 1 -
> drivers/mmc/host/sdhci-spear.c | 1 -
> drivers/mmc/host/sdhci-tegra.c | 1 -
> drivers/mmc/host/sh_mmcif.c | 1 -
> drivers/mmc/host/sh_mobile_sdhi.c | 1 -
> drivers/mmc/host/sunxi-mmc.c | 1 -
> 32 files changed, 4 insertions(+), 52 deletions(-)
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
@ 2014-08-18 14:19 ` Michal Simek
2014-08-21 13:11 ` Peter Griffin
0 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2014-08-18 14:19 UTC (permalink / raw)
To: Peter Griffin, linux-arm-kernel, linux-kernel, tgih.jun,
jh80.chung, chris, ulf.hansson, jarkko.lavinen, balajitk, baohua,
viresh.linux, ian.molton, maxime.ripard, linux-mmc, linux-omap,
spear-devel, linux-tegra, michal.simek, swarren
Cc: lee.jones, patches
[-- Attachment #1.1: Type: text/plain, Size: 1862 bytes --]
Hi Peter,
On 08/12/2014 06:14 PM, Peter Griffin wrote:
> This patch removes the superflous .owner field for drivers which
> use the module_platform_driver API, as this is overriden in
> platform_driver_register anyway.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
> drivers/mmc/host/jz4740_mmc.c | 1 -
> drivers/mmc/host/moxart-mmc.c | 1 -
> drivers/mmc/host/mxcmmc.c | 1 -
> drivers/mmc/host/mxs-mmc.c | 1 -
> drivers/mmc/host/omap.c | 1 -
> drivers/mmc/host/omap_hsmmc.c | 1 -
> drivers/mmc/host/pxamci.c | 1 -
> drivers/mmc/host/rtsx_pci_sdmmc.c | 1 -
> drivers/mmc/host/rtsx_usb_sdmmc.c | 1 -
> drivers/mmc/host/s3cmci.c | 1 -
> drivers/mmc/host/sdhci-bcm-kona.c | 1 -
> drivers/mmc/host/sdhci-bcm2835.c | 1 -
> drivers/mmc/host/sdhci-cns3xxx.c | 1 -
> drivers/mmc/host/sdhci-dove.c | 1 -
> drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
> drivers/mmc/host/sdhci-msm.c | 1 -
> drivers/mmc/host/sdhci-of-arasan.c | 1 -
> drivers/mmc/host/sdhci-of-esdhc.c | 1 -
> drivers/mmc/host/sdhci-of-hlwd.c | 1 -
> drivers/mmc/host/sdhci-pxav2.c | 1 -
> drivers/mmc/host/sdhci-pxav3.c | 1 -
> drivers/mmc/host/sdhci-s3c.c | 1 -
> drivers/mmc/host/sdhci-sirf.c | 1 -
> drivers/mmc/host/sdhci-spear.c | 1 -
> drivers/mmc/host/sdhci-tegra.c | 1 -
> drivers/mmc/host/sh_mmcif.c | 1 -
> drivers/mmc/host/sh_mobile_sdhi.c | 1 -
> drivers/mmc/host/sunxi-mmc.c | 1 -
> 28 files changed, 28 deletions(-)
I have checked this for all xilinx drivers we have in the tree
and I have sent similar patches.
This problem is probably in all subsystems.
With communication with Mark Brown. Don't you have
cocinelle script for fixing this everywhere?
Thanks,
Michal
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver
2014-08-18 14:19 ` Michal Simek
@ 2014-08-21 13:11 ` Peter Griffin
0 siblings, 0 replies; 9+ messages in thread
From: Peter Griffin @ 2014-08-21 13:11 UTC (permalink / raw)
To: Michal Simek
Cc: linux-arm-kernel, linux-kernel, tgih.jun, jh80.chung, chris,
ulf.hansson, jarkko.lavinen, balajitk, baohua, viresh.linux,
ian.molton, maxime.ripard, linux-mmc, linux-omap, spear-devel,
linux-tegra, swarren, patches, lee.jones
Hi Michal,
On Mon, 18 Aug 2014, Michal Simek wrote:
> I have checked this for all xilinx drivers we have in the tree
> and I have sent similar patches.
> This problem is probably in all subsystems.
Yep
> With communication with Mark Brown. Don't you have
> cocinelle script for fixing this everywhere?
Nope. Never really looked at cocinelle until now, but it looks like
a useful tool for these sort of mass updates.
regards,
Peter.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-08-21 13:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
2014-08-18 14:19 ` Michal Simek
2014-08-21 13:11 ` Peter Griffin
2014-08-12 16:14 ` [PATCH 2/5] mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP Peter Griffin
2014-08-12 16:14 ` [PATCH 3/5] mmc: dw_mmc-pltfm: " Peter Griffin
[not found] ` <1407860069-12706-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-12 16:14 ` [PATCH 4/5] mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Peter Griffin
2014-08-18 12:38 ` [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Ulf Hansson
2014-08-12 16:14 ` [PATCH 5/5] mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Peter Griffin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).