aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-09-19 14:22:13 +0200
committerHans de Goede <hdegoede@redhat.com>2022-09-19 14:47:34 +0200
commitc710765a4742337e40199403acde2fdd3189183d (patch)
tree174f1da1245628d1d35b9bfad32a32b8452f987a /drivers/platform
parentplatform/x86: toshiba_acpi: Remove duplicate include (diff)
downloadlinux-dev-c710765a4742337e40199403acde2fdd3189183d.tar.xz
linux-dev-c710765a4742337e40199403acde2fdd3189183d.zip
platform/x86: wmi: Drop forward declaration of static functions
Usually it's not necessary to declare static functions if the symbols are in the right order. Moving the definition of acpi_wmi_driver down in the compilation unit allows to drop two such declarations. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220919122213.852322-1-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/wmi.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index aff23309b5d3..223550a10d4d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -95,9 +95,6 @@ module_param(debug_dump_wdg, bool, 0444);
MODULE_PARM_DESC(debug_dump_wdg,
"Dump available WMI interfaces [0/1]");
-static int acpi_wmi_remove(struct platform_device *device);
-static int acpi_wmi_probe(struct platform_device *device);
-
static const struct acpi_device_id wmi_device_ids[] = {
{"PNP0C14", 0},
{"pnp0c14", 0},
@@ -111,15 +108,6 @@ static const char * const allow_duplicates[] = {
NULL
};
-static struct platform_driver acpi_wmi_driver = {
- .driver = {
- .name = "acpi-wmi",
- .acpi_match_table = wmi_device_ids,
- },
- .probe = acpi_wmi_probe,
- .remove = acpi_wmi_remove,
-};
-
/*
* GUID parsing functions
*/
@@ -1480,6 +1468,15 @@ void wmi_driver_unregister(struct wmi_driver *driver)
}
EXPORT_SYMBOL(wmi_driver_unregister);
+static struct platform_driver acpi_wmi_driver = {
+ .driver = {
+ .name = "acpi-wmi",
+ .acpi_match_table = wmi_device_ids,
+ },
+ .probe = acpi_wmi_probe,
+ .remove = acpi_wmi_remove,
+};
+
static int __init acpi_wmi_init(void)
{
int error;