From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdBTJKe (ORCPT ); Mon, 20 Feb 2017 04:10:34 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33309 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdBTJKc (ORCPT ); Mon, 20 Feb 2017 04:10:32 -0500 Date: Mon, 20 Feb 2017 01:10:28 -0800 From: =?us-ascii?B?PT9VVEYtOD9xP1ZhbGVudGluPTIwSD1DMz1CQ2JuZXI/PQ==?= To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] Staging: board: Fix redundant macro Message-ID: <20170220091028.GA3611@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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