Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938748AbcKQKBw (ORCPT ); Thu, 17 Nov 2016 05:01:52 -0500 Received: from atlantic540.startdedicated.de ([188.138.9.77]:49616 "EHLO atlantic540.startdedicated.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935363AbcKQKBI (ORCPT ); Thu, 17 Nov 2016 05:01:08 -0500 From: Daniel Wagner To: linux-kernel@vger.kernel.org Cc: Ming Lei , "Luis R . Rodriguez" , Greg Kroah-Hartman , "Rafael J . Wysocki" , Daniel Vetter , Takashi Iwai , Bjorn Andersson , Arend van Spriel , Yves-Alexis Perez , Daniel Wagner Subject: [PATCH v7 4/4] firmware: move fw_state_is_done() into UHM section Date: Thu, 17 Nov 2016 11:00:51 +0100 Message-Id: <1479376851-2307-5-git-send-email-wagi@monom.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479376851-2307-1-git-send-email-wagi@monom.org> References: <1479376851-2307-1-git-send-email-wagi@monom.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1862 Lines: 55 From: Daniel Wagner fw_state_is_done() is only used for UHM so moved into that section. Cc: Ming Lei Cc: Luis R. Rodriguez Cc: Greg Kroah-Hartman Signed-off-by: Daniel Wagner --- drivers/base/firmware_class.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 0208a37cd2ff..fe1cc42512a9 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -122,11 +122,6 @@ static void fw_state_init(struct fw_state *fw_st) fw_st->status = FW_STATUS_UNKNOWN; } -static int __fw_state_check(struct fw_state *fw_st, enum fw_status status) -{ - return fw_st->status == status; -} - static inline bool __fw_state_is_done(enum fw_status status) { return status == FW_STATUS_DONE || status == FW_STATUS_ABORTED; @@ -158,8 +153,6 @@ static void __fw_state_set(struct fw_state *fw_st, __fw_state_set(fw_st, FW_STATUS_LOADING) #define fw_state_done(fw_st) \ __fw_state_set(fw_st, FW_STATUS_DONE) -#define fw_state_is_done(fw_st) \ - __fw_state_check(fw_st, FW_STATUS_DONE) #define fw_state_wait(fw_st) \ __fw_state_wait_common(fw_st, MAX_SCHEDULE_TIMEOUT) @@ -169,8 +162,15 @@ static void __fw_state_set(struct fw_state *fw_st, #else /* CONFIG_FW_LOADER_USER_HELPER */ +static int __fw_state_check(struct fw_state *fw_st, enum fw_status status) +{ + return fw_st->status == status; +} + #define fw_state_aborted(fw_st) \ __fw_state_set(fw_st, FW_STATUS_ABORTED) +#define fw_state_is_done(fw_st) \ + __fw_state_check(fw_st, FW_STATUS_DONE) #define fw_state_is_loading(fw_st) \ __fw_state_check(fw_st, FW_STATUS_LOADING) #define fw_state_is_aborted(fw_st) \ -- 2.7.4