From cd50430ceb3598957803934068531a274349bcf9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 10 Aug 2023 16:19:24 +0200 Subject: macintosh/ams: mark ams_init() static This is the module init function, which by definition is used only locally, so mark it static to avoid a warning: drivers/macintosh/ams/ams-core.c:179:12: error: no previous prototype for 'ams_init' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230810141947.1236730-7-arnd@kernel.org --- drivers/macintosh/ams/ams-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/macintosh') diff --git a/drivers/macintosh/ams/ams-core.c b/drivers/macintosh/ams/ams-core.c index 877e8cb23128..c978b4272daa 100644 --- a/drivers/macintosh/ams/ams-core.c +++ b/drivers/macintosh/ams/ams-core.c @@ -176,7 +176,7 @@ release_freefall: return result; } -int __init ams_init(void) +static int __init ams_init(void) { struct device_node *np; -- cgit v1.2.3 From 85a616416e9e01db0bfa92f26457e92642e2236b Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 29 Aug 2023 15:58:37 -0700 Subject: macintosh/ams: linux/platform_device.h is needed ams.h uses struct platform_device, so the header should be used to prevent build errors: drivers/macintosh/ams/ams-input.c: In function 'ams_input_enable': drivers/macintosh/ams/ams-input.c:68:45: error: invalid use of undefined type 'struct platform_device' 68 | input->dev.parent = &ams_info.of_dev->dev; drivers/macintosh/ams/ams-input.c: In function 'ams_input_init': drivers/macintosh/ams/ams-input.c:146:51: error: invalid use of undefined type 'struct platform_device' 146 | return device_create_file(&ams_info.of_dev->dev, &dev_attr_joystick); drivers/macintosh/ams/ams-input.c: In function 'ams_input_exit': drivers/macintosh/ams/ams-input.c:151:44: error: invalid use of undefined type 'struct platform_device' 151 | device_remove_file(&ams_info.of_dev->dev, &dev_attr_joystick); drivers/macintosh/ams/ams-input.c: In function 'ams_input_init': drivers/macintosh/ams/ams-input.c:147:1: error: control reaches end of non-void function [-Werror=return-type] 147 | } Fixes: 233d687d1b78 ("macintosh: Explicitly include correct DT includes") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://msgid.link/20230829225837.15520-1-rdunlap@infradead.org --- drivers/macintosh/ams/ams.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/macintosh') diff --git a/drivers/macintosh/ams/ams.h b/drivers/macintosh/ams/ams.h index 2c159c8844c1..4b93c766a551 100644 --- a/drivers/macintosh/ams/ams.h +++ b/drivers/macintosh/ams/ams.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3