From patchwork Mon Apr 11 22:21:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 609090 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qkPgZ0C2Lz9snm for ; Tue, 12 Apr 2016 08:22:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E40F8A75BF; Tue, 12 Apr 2016 00:21:57 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7fgg8PZw7cYL; Tue, 12 Apr 2016 00:21:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78C4AA7521; Tue, 12 Apr 2016 00:21:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3CF6BA7521 for ; Tue, 12 Apr 2016 00:21:54 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsOf3TGoZ_e8 for ; Tue, 12 Apr 2016 00:21:54 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from fed1rmfepo203.cox.net (fed1rmfepo203.cox.net [68.230.241.148]) by theia.denx.de (Postfix) with ESMTP id 68AF1A748A for ; Tue, 12 Apr 2016 00:21:49 +0200 (CEST) Received: from fed1rmimpo209.cox.net ([68.230.241.160]) by fed1rmfepo203.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20160411222147.KHYN26141.fed1rmfepo203.cox.net@fed1rmimpo209.cox.net> for ; Mon, 11 Apr 2016 18:21:47 -0400 Received: from localhost.localdomain ([98.167.220.73]) by fed1rmimpo209.cox.net with cox id hAMn1s00B1bd1YJ01AMn5x; Mon, 11 Apr 2016 18:21:47 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020201.570C237B.0118, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.1 cv=H/J7u7si c=1 sm=1 tr=0 a=IKzc1XMGcUxYR4OhBl0X0A==:117 a=IKzc1XMGcUxYR4OhBl0X0A==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=9_1hYV8uAAAA:8 a=eWooXlWDbNsP3Hu9_PUA:9 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (CRAM-MD5) smtp.auth=eric.a.nelson@cox.net From: Eric Nelson To: u-boot@lists.denx.de Date: Mon, 11 Apr 2016 15:21:37 -0700 Message-Id: <1460413297-16640-1-git-send-email-eric@nelint.com> X-Mailer: git-send-email 2.6.2 Cc: swarren@nvidia.com Subject: [U-Boot] [PATCH] gunzip.c: use block layer for writes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call blk_dwrite to ensure that the block cache is notified if enabled and remove build breakage when CONFIG_BLK is enabled. Signed-off-by: Eric Nelson Reviewed-by: Stephen Warren Reviewed-by: Simon Glass --- lib/gunzip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/gunzip.c b/lib/gunzip.c index 6d65ccc..bc746d6 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -232,9 +232,8 @@ int gzwrite(unsigned char *src, int len, gzwrite_progress(iteration++, totalfilled, szexpected); - blocks_written = dev->block_write(dev, outblock, - writeblocks, - writebuf); + blocks_written = blk_dwrite(dev, outblock, + writeblocks, writebuf); outblock += blocks_written; if (ctrlc()) { puts("abort\n");