From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F2CCC04E87 for ; Mon, 20 May 2019 12:34:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1782621726 for ; Mon, 20 May 2019 12:34:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355676; bh=+ahlxkje3y2jyBIvC2s6nmMIj2CEAeJyiNprwZ7zUu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Zr/GBSZde2bNTB4y+Of44N55jyO1bYyqyJvMPR8/djIHdZVndrHyKrjiy8cA3CvBC j4Z5UXgoUxz+fTaE0Fr4gh1BzsBg+9NxJEUCA6fAN2+K7z8Eje3F9+Z1sE8l3HoyZN hUt/gl1HH/3kTdyBscol4qJvBmQt98JyOIhqIwz0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390602AbfETMee (ORCPT ); Mon, 20 May 2019 08:34:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:51924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390592AbfETMed (ORCPT ); Mon, 20 May 2019 08:34:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C29820815; Mon, 20 May 2019 12:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355673; bh=+ahlxkje3y2jyBIvC2s6nmMIj2CEAeJyiNprwZ7zUu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W81+t1splnFngwSypNY9CCfQMHqR33CuD5GIME6TWddvngV3Lpn4+B2fSp2+FSEfP ouK/ZPkVDh2IEA62rcX0rT+WFz8xMA6g8zjCh4qrTg6DLFxCxGPQwxDgH4HbP80PUI XryFbgnw4EssukaFKehFfgjQdr4FAzm0CXWN0vOk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Packham , Boris Brezillon , Richard Weinberger Subject: [PATCH 5.1 080/128] mtd: maps: physmap: Store gpio_values correctly Date: Mon, 20 May 2019 14:14:27 +0200 Message-Id: <20190520115255.048273677@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115249.449077487@linuxfoundation.org> References: <20190520115249.449077487@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chris Packham commit 64d14c6fe040361ff6aecb825e392cf97837cd9e upstream. When the gpio-addr-flash.c driver was merged with physmap-core.c the code to store the current gpio_values was lost. This meant that once a gpio was asserted it was never de-asserted. Fix this by storing the current offset in gpio_values like the old driver used to. Fixes: commit ba32ce95cbd9 ("mtd: maps: Merge gpio-addr-flash.c into physmap-core.c") Cc: Signed-off-by: Chris Packham Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/maps/physmap-core.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/mtd/maps/physmap-core.c +++ b/drivers/mtd/maps/physmap-core.c @@ -132,6 +132,8 @@ static void physmap_set_addr_gpios(struc gpiod_set_value(info->gpios->desc[i], !!(BIT(i) & ofs)); } + + info->gpio_values = ofs; } #define win_mask(order) (BIT(order) - 1)