From patchwork Thu Sep 6 06:57:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 10589927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2D3E180E for ; Thu, 6 Sep 2018 06:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BACE82A3AB for ; Thu, 6 Sep 2018 06:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF4152A3A2; Thu, 6 Sep 2018 06:57:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 601EE2A3E2 for ; Thu, 6 Sep 2018 06:57:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727664AbeIFLbw (ORCPT ); Thu, 6 Sep 2018 07:31:52 -0400 Received: from nbd.name ([46.4.11.11]:48216 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727683AbeIFLbw (ORCPT ); Thu, 6 Sep 2018 07:31:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xD0qJ+cK8DOgleD+aPLj5eJrzYKxzmSe36idyUQPPtE=; b=pFBqTEGmb1BppgQg6sHN7R7rDI TkQipWJLVC0b7qz6qb+elSrAuJ+mE8xlj70q8VOP0xULwIMOExWhn/iH6meEwE/b/+1zbQ4IC8c6J ZmHu9fbTXPJ2e+WlOEBjxwV5YKlDGYaEwntjBCm8B/Rq4MwkS9HKC6ihPuq2PxnENFeM=; Received: by maeck.lan (Postfix, from userid 501) id 19AD0379246F; Thu, 6 Sep 2018 08:57:50 +0200 (CEST) From: Felix Fietkau To: backports@vger.kernel.org Cc: john@phrozen.org Subject: [PATCH 6/6] backport: add firmware_request_nowarn and firmware_request_cache Date: Thu, 6 Sep 2018 08:57:50 +0200 Message-Id: <20180906065750.89673-6-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180906065750.89673-1-nbd@nbd.name> References: <20180906065750.89673-1-nbd@nbd.name> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Felix Fietkau --- backport/backport-include/linux/firmware.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backport/backport-include/linux/firmware.h b/backport/backport-include/linux/firmware.h index 186eec3e..b5bc16be 100644 --- a/backport/backport-include/linux/firmware.h +++ b/backport/backport-include/linux/firmware.h @@ -5,5 +5,16 @@ #if LINUX_VERSION_IS_LESS(3,14,0) #define request_firmware_direct(fw, name, device) request_firmware(fw, name, device) #endif +#if LINUX_VERSION_IS_LESS(4,18,0) +#define firmware_request_nowarn(fw, name, device) request_firmware(fw, name, device) +#endif + +#if LINUX_VERSION_IS_LESS(4,17,0) +#define firmware_request_cache LINUX_BACKPORT(firmware_request_cache) +static inline int firmware_request_cache(struct device *device, const char *name) +{ + return 0; +} +#endif #endif /* __BACKPORT_LINUX_FIRMWARE_H */