[PATCH v2 10/15] staging: fbtft: Fixes some defines styles - Style
From: Leonardo BrÃs
Date: Tue Aug 07 2018 - 20:29:33 EST
Fixing some styles as recommended by checkpatch.pl.
Signed-off-by: Leonardo BrÃs <leobras.c@xxxxxxxxx>
---
drivers/staging/fbtft/fbtft-bus.c | 10 ++++++----
drivers/staging/fbtft/fbtft-core.c | 6 ++++--
drivers/staging/fbtft/fbtft.h | 4 ++--
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 8ce1ff9b6c2a..20d94712cc84 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -60,11 +60,13 @@ void func(struct fbtft_par *par, int len, ...) \
out: \
va_end(args); \
} \
-EXPORT_SYMBOL(func);
+EXPORT_SYMBOL(func)
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
-define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+#define no_modf /*No modifier*/
+
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, no_modf);
+define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16);
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, no_modf);
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 64f69d1a3029..8b79353c722a 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -275,6 +275,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par)
par->info->bl_dev = NULL;
}
}
+EXPORT_SYMBOL(fbtft_unregister_backlight);
static const struct backlight_ops fbtft_bl_ops = {
.get_brightness = fbtft_backlight_get_brightness,
@@ -312,12 +313,13 @@ void fbtft_register_backlight(struct fbtft_par *par)
if (!par->fbtftops.unregister_backlight)
par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
}
+EXPORT_SYMBOL(fbtft_register_backlight);
#else
void fbtft_register_backlight(struct fbtft_par *par) { };
-void fbtft_unregister_backlight(struct fbtft_par *par) { };
-#endif
EXPORT_SYMBOL(fbtft_register_backlight);
+void fbtft_unregister_backlight(struct fbtft_par *par) { };
EXPORT_SYMBOL(fbtft_unregister_backlight);
+#endif
static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
int ye)
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 87114502e836..6ee9ff320567 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -232,7 +232,7 @@ struct fbtft_par {
bool polarity;
};
-#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int))
+#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__}) / sizeof(int))
#define write_reg(par, ...) \
((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
@@ -342,7 +342,7 @@ static void __exit fbtft_driver_module_exit(void) \
} \
\
module_init(fbtft_driver_module_init); \
-module_exit(fbtft_driver_module_exit);
+module_exit(fbtft_driver_module_exit)
/* Debug macros */
--
2.18.0