Skip to content

Commit 50371ef

Browse files
claudiubezneaUlf Hansson
authored andcommitted
mmc: renesas_sdhi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr()
SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() require __maybe_unused or #ifdefs protection against unused function warnings. The usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning. Drop the #ifdefs. Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 1521338 commit 50371ef

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

drivers/mmc/host/renesas_sdhi_internal_dmac.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,18 +600,17 @@ static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
600600
}
601601

602602
static const struct dev_pm_ops renesas_sdhi_internal_dmac_dev_pm_ops = {
603-
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
604-
pm_runtime_force_resume)
605-
SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
606-
tmio_mmc_host_runtime_resume,
607-
NULL)
603+
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
604+
RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
605+
tmio_mmc_host_runtime_resume,
606+
NULL)
608607
};
609608

610609
static struct platform_driver renesas_internal_dmac_sdhi_driver = {
611610
.driver = {
612611
.name = "renesas_sdhi_internal_dmac",
613612
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
614-
.pm = &renesas_sdhi_internal_dmac_dev_pm_ops,
613+
.pm = pm_ptr(&renesas_sdhi_internal_dmac_dev_pm_ops),
615614
.of_match_table = renesas_sdhi_internal_dmac_of_match,
616615
},
617616
.probe = renesas_sdhi_internal_dmac_probe,

drivers/mmc/host/tmio_mmc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,8 @@ void tmio_mmc_enable_mmc_irqs(struct tmio_mmc_host *host, u32 i);
209209
void tmio_mmc_disable_mmc_irqs(struct tmio_mmc_host *host, u32 i);
210210
irqreturn_t tmio_mmc_irq(int irq, void *devid);
211211

212-
#ifdef CONFIG_PM
213212
int tmio_mmc_host_runtime_suspend(struct device *dev);
214213
int tmio_mmc_host_runtime_resume(struct device *dev);
215-
#endif
216214

217215
static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr)
218216
{

0 commit comments

Comments
 (0)