diff mbox series

[v2,13/13] ARM: s3c24xx: camif: include header with prototypes and unify declaration

Message ID 20200804192654.12783-14-krzk@kernel.org
State New
Headers show
Series [v2,01/13] clk: samsung: s3c64xx: declare s3c64xx_clk_init() in shared header | expand

Commit Message

Krzysztof Kozlowski Aug. 4, 2020, 7:26 p.m. UTC
The s3c_camif_gpio_put() declaration in
include/media/drv-intf/s3c_camif.h header was different than definition.
Fixing this allows to include that header to also fix the W=1 compile
warnings:

    arch/arm/mach-s3c24xx/setup-camif.c:28:5: warning: no previous prototype for 's3c_camif_gpio_get' [-Wmissing-prototypes]
       28 | int s3c_camif_gpio_get(void)
    arch/arm/mach-s3c24xx/setup-camif.c:56:6: warning: no previous prototype for 's3c_camif_gpio_put' [-Wmissing-prototypes]
       56 | void s3c_camif_gpio_put(void)

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. New patch
---
 arch/arm/mach-s3c24xx/setup-camif.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Sept. 6, 2020, 3:41 p.m. UTC | #1
On Thu, 27 Aug 2020 at 22:51, Cedric Roux <sed@free.fr> wrote:
>
> On 8/12/20 3:31 PM, Krzysztof Kozlowski wrote:
> > Or even more important - is it worth to spend effort and time on this?
> > If there is no single production system using recent Linux kernel, the
> > answer should be negative...
>
> Well, I have a server running on mini2440 with a not-too-young
> but not-too-old kernel. I don't have much time to test recent
> kernels though so I guess that doesn't count.

Actually good to hear. It counts a little bit :)

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm/mach-s3c24xx/setup-camif.c b/arch/arm/mach-s3c24xx/setup-camif.c
index 2b262fae3f61..4046afaad645 100644
--- a/arch/arm/mach-s3c24xx/setup-camif.c
+++ b/arch/arm/mach-s3c24xx/setup-camif.c
@@ -7,6 +7,7 @@ 
 #include <linux/gpio.h>
 #include <plat/gpio-cfg.h>
 #include <mach/gpio-samsung.h>
+#include <media/drv-intf/s3c_camif.h>
 
 /* Number of camera port pins, without FIELD */
 #define S3C_CAMIF_NUM_GPIOS	13
@@ -53,7 +54,7 @@  int s3c_camif_gpio_get(void)
 	return 0;
 }
 
-void s3c_camif_gpio_put(void)
+int s3c_camif_gpio_put(void)
 {
 	int i, gpio_start, gpio_reset;
 
@@ -64,4 +65,6 @@  void s3c_camif_gpio_put(void)
 		if (gpio != gpio_reset)
 			gpio_free(gpio);
 	}
+
+	return 0;
 }