public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: board: Fix redundant macro
@ 2017-02-20  9:10 =?UTF-8?q?Valentin=20H=C3=BCbner?=
  2017-02-20 12:39 ` kbuild test robot
  2017-02-20 12:47 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: =?UTF-8?q?Valentin=20H=C3=BCbner?= @ 2017-02-20  9:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Fixes a 'macro with flow control statement' checkpatch code style
error by removing the board_staging() macro and replacing its one
and only call

Signed-off-by: Valentin Hübner <valentin.huebner@gmail.com>
---
 drivers/staging/board/armadillo800eva.c | 10 +++++++++-
 drivers/staging/board/board.h           | 11 -----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/board/armadillo800eva.c b/drivers/staging/board/armadillo800eva.c
index 4de4fd0..2f1613a 100644
--- a/drivers/staging/board/armadillo800eva.c
+++ b/drivers/staging/board/armadillo800eva.c
@@ -101,4 +101,12 @@ static void __init armadillo800eva_init(void)
 				       ARRAY_SIZE(armadillo800eva_devices));
 }
 
-board_staging("renesas,armadillo800eva", armadillo800eva_init);
+static int __init runtime_board_check(void)
+{
+	if (of_machine_is_compatible("renesas,armadillo800eva"))
+		armadillo800eva_init();
+
+	return 0;
+}
+
+device_initcall(runtime_board_check)
diff --git a/drivers/staging/board/board.h b/drivers/staging/board/board.h
index 42ed125..0fa1197 100644
--- a/drivers/staging/board/board.h
+++ b/drivers/staging/board/board.h
@@ -31,15 +31,4 @@ int board_staging_register_device(const struct board_staging_dev *dev);
 void board_staging_register_devices(const struct board_staging_dev *devs,
 				    unsigned int ndevs);
 
-#define board_staging(str, fn)			\
-static int __init runtime_board_check(void)	\
-{						\
-	if (of_machine_is_compatible(str))	\
-		fn();				\
-						\
-	return 0;				\
-}						\
-						\
-device_initcall(runtime_board_check)
-
 #endif /* __BOARD_H__ */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-20 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20  9:10 [PATCH] Staging: board: Fix redundant macro =?UTF-8?q?Valentin=20H=C3=BCbner?=
2017-02-20 12:39 ` kbuild test robot
2017-02-20 12:47 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox