Re: [PATCH] Staging: fbtft: move externs to header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Den 03.03.2015 11:19, skrev Drew Fustini:
Move extern declartions from fbtft-core.c to fbtft header file. This resovles
the warning from checkpatch.pl that "externs should be avoided in .c files".

Signed-off-by: Drew Fustini <pdp7pdp7@xxxxxxxxx>
---
  drivers/staging/fbtft/fbtft-core.c | 5 -----
  drivers/staging/fbtft/fbtft.h      | 7 +++++++
  2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index ac4287f..3422faf 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -42,11 +42,6 @@
#include "fbtft.h" -extern void fbtft_sysfs_init(struct fbtft_par *par);
-extern void fbtft_sysfs_exit(struct fbtft_par *par);
-extern void fbtft_expand_debug_value(unsigned long *debug);
-extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
-						const char *str, int size);
static unsigned long debug;
  module_param(debug, ulong, 0);
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 0dbf3f9..9e729e5 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -277,6 +277,13 @@ extern int fbtft_init_display(struct fbtft_par *par);
  extern int fbtft_probe_common(struct fbtft_display *display,
  	struct spi_device *sdev, struct platform_device *pdev);
  extern int fbtft_remove_common(struct device *dev, struct fb_info *info);
+extern void fbtft_sysfs_init(struct fbtft_par *par);
+extern void fbtft_sysfs_exit(struct fbtft_par *par);
+extern void fbtft_expand_debug_value(unsigned long *debug);
+extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
+						const char *str, int size);
+
+
/* fbtft-io.c */
  extern int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len);

These functions are defined in fbtft-sysfs.c and internal to the fbtft module.
I think it's better to put them in an 'internal.h' file.
The fbtft.h file will eventually live in include/linux/fbtft.h or something like that.


Noralf.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux