Skip to content

Commit 6a0c7d3

Browse files
committed
ACPI: AC: Get rid of unnecessary declarations
Drop unnecessary forward declarations of 4 functions and move the SIMPLE_DEV_PM_OPS() definition after the definition of the resume callback function. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/3757869.R56niFO833@rafael.j.wysocki
1 parent 1f318b9 commit 6a0c7d3

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

drivers/acpi/ac.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,12 @@ MODULE_AUTHOR("Paul Diefenbaugh");
3333
MODULE_DESCRIPTION("ACPI AC Adapter Driver");
3434
MODULE_LICENSE("GPL");
3535

36-
static int acpi_ac_probe(struct platform_device *pdev);
37-
static void acpi_ac_remove(struct platform_device *pdev);
38-
39-
static void acpi_ac_notify(acpi_handle handle, u32 event, void *data);
40-
4136
static const struct acpi_device_id ac_device_ids[] = {
4237
{"ACPI0003", 0},
4338
{"", 0},
4439
};
4540
MODULE_DEVICE_TABLE(acpi, ac_device_ids);
4641

47-
#ifdef CONFIG_PM_SLEEP
48-
static int acpi_ac_resume(struct device *dev);
49-
#endif
50-
static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
51-
5242
static int ac_sleep_before_get_state_ms;
5343
static int ac_only;
5444

@@ -272,10 +262,10 @@ static int acpi_ac_resume(struct device *dev)
272262

273263
return 0;
274264
}
275-
#else
276-
#define acpi_ac_resume NULL
277265
#endif
278266

267+
static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
268+
279269
static void acpi_ac_remove(struct platform_device *pdev)
280270
{
281271
struct acpi_ac *ac = platform_get_drvdata(pdev);

0 commit comments

Comments
 (0)