Skip to content

Commit 5ea0a22

Browse files
committed
ALSA: oxygen: Convert to EXPORT_SIMPLE_DEV_PM_OPS()
Use the newer EXPORT_SIMPLE_DEV_PM_OPS() macro instead of SIPLE_DEV_PM_OPS() and manual export, together with pm_ptr() macro, which makes CONFIG_PM_SLEEP ifdefs superfluous. Merely a cleanup, there should be no actual code change. Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent f923335 commit 5ea0a22

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

sound/pci/oxygen/oxygen.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,11 +854,9 @@ static struct pci_driver oxygen_driver = {
854854
.name = KBUILD_MODNAME,
855855
.id_table = oxygen_ids,
856856
.probe = generic_oxygen_probe,
857-
#ifdef CONFIG_PM_SLEEP
858857
.driver = {
859-
.pm = &oxygen_pci_pm,
858+
.pm = pm_ptr(&oxygen_pci_pm),
860859
},
861-
#endif
862860
};
863861

864862
module_pci_driver(oxygen_driver);

sound/pci/oxygen/oxygen.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
161161
const struct pci_device_id *id
162162
)
163163
);
164-
#ifdef CONFIG_PM_SLEEP
165164
extern const struct dev_pm_ops oxygen_pci_pm;
166-
#endif
167165
void oxygen_pci_shutdown(struct pci_dev *pci);
168166

169167
/* oxygen_mixer.c */

sound/pci/oxygen/oxygen_lib.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
713713
}
714714
EXPORT_SYMBOL(oxygen_pci_probe);
715715

716-
#ifdef CONFIG_PM_SLEEP
717716
static int oxygen_pci_suspend(struct device *dev)
718717
{
719718
struct snd_card *card = dev_get_drvdata(dev);
@@ -789,9 +788,7 @@ static int oxygen_pci_resume(struct device *dev)
789788
return 0;
790789
}
791790

792-
SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume);
793-
EXPORT_SYMBOL(oxygen_pci_pm);
794-
#endif /* CONFIG_PM_SLEEP */
791+
EXPORT_SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume);
795792

796793
void oxygen_pci_shutdown(struct pci_dev *pci)
797794
{

sound/pci/oxygen/se6x.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,9 @@ static struct pci_driver se6x_driver = {
137137
.name = KBUILD_MODNAME,
138138
.id_table = se6x_ids,
139139
.probe = se6x_probe,
140-
#ifdef CONFIG_PM_SLEEP
141140
.driver = {
142-
.pm = &oxygen_pci_pm,
141+
.pm = pm_ptr(&oxygen_pci_pm),
143142
},
144-
#endif
145143
.shutdown = oxygen_pci_shutdown,
146144
};
147145

sound/pci/oxygen/virtuoso.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ static struct pci_driver xonar_driver = {
8282
.name = KBUILD_MODNAME,
8383
.id_table = xonar_ids,
8484
.probe = xonar_probe,
85-
#ifdef CONFIG_PM_SLEEP
8685
.driver = {
87-
.pm = &oxygen_pci_pm,
86+
.pm = pm_ptr(&oxygen_pci_pm),
8887
},
89-
#endif
9088
.shutdown = oxygen_pci_shutdown,
9189
};
9290

0 commit comments

Comments
 (0)