mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
mmc: via-sdmmc: use modern PM macros
Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://lore.kernel.org/r/20250815013413.28641-35-jszhang@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
1d955e4aff
commit
9ae88dc98d
|
|
@ -1218,7 +1218,7 @@ static void via_sd_remove(struct pci_dev *pcidev)
|
|||
pci_name(pcidev), (int)pcidev->vendor, (int)pcidev->device);
|
||||
}
|
||||
|
||||
static void __maybe_unused via_init_sdc_pm(struct via_crdr_mmc_host *host)
|
||||
static void via_init_sdc_pm(struct via_crdr_mmc_host *host)
|
||||
{
|
||||
struct sdhcreg *pm_sdhcreg;
|
||||
void __iomem *addrbase;
|
||||
|
|
@ -1252,7 +1252,7 @@ static void __maybe_unused via_init_sdc_pm(struct via_crdr_mmc_host *host)
|
|||
via_print_sdchc(host);
|
||||
}
|
||||
|
||||
static int __maybe_unused via_sd_suspend(struct device *dev)
|
||||
static int via_sd_suspend(struct device *dev)
|
||||
{
|
||||
struct via_crdr_mmc_host *host;
|
||||
unsigned long flags;
|
||||
|
|
@ -1269,7 +1269,7 @@ static int __maybe_unused via_sd_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused via_sd_resume(struct device *dev)
|
||||
static int via_sd_resume(struct device *dev)
|
||||
{
|
||||
struct via_crdr_mmc_host *sdhost;
|
||||
u8 gatt;
|
||||
|
|
@ -1295,14 +1295,14 @@ static int __maybe_unused via_sd_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume);
|
||||
|
||||
static struct pci_driver via_sd_driver = {
|
||||
.name = DRV_NAME,
|
||||
.id_table = via_ids,
|
||||
.probe = via_sd_probe,
|
||||
.remove = via_sd_remove,
|
||||
.driver.pm = &via_sd_pm_ops,
|
||||
.driver.pm = pm_sleep_ptr(&via_sd_pm_ops),
|
||||
};
|
||||
|
||||
module_pci_driver(via_sd_driver);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user