Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1586224ybm; Tue, 21 May 2019 17:10:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyubzO3m4OSDg4cNdlyCJsbcyGURJ7Xd9JLFNFkyLNyTlzt/xUJGKO0vtngzSlpFW1qQlFw X-Received: by 2002:a17:902:7442:: with SMTP id e2mr6618986plt.67.1558483805145; Tue, 21 May 2019 17:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558483805; cv=none; d=google.com; s=arc-20160816; b=EHd4tySFPojZ+PGi8Hr54sil3RbHB5Z1HdJDr7L73GC4uJCqnEMM+Ku8IFxazpDBq2 Qy2t1lvmRcoGFvNmvwiYQDAF0Vsan4X+K3FeBxsvoaD5FXqzaR9gFMRSqmR0Zq42bwP8 55c5r+HQa+QL5t5lNHn7U8OOsqlcII66Fgf5l+lZBq6ofa2bhwjuIjYUfR9eMbPdqa0R WD9BK0bNdZicdNIHF763SPX68z2kaha4XyTV7adRCGJ+bDKaZB3jp+aLK4M6XEoT6ZCR D/GLO05JJRy7JTLlko+2wZzDn7TwxCZtrh39N/1pyhpx1NcURrS0rExm1sNP873fTGcG UFhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b7vi3evCHUpG9dV383KMpTjNqi3Fn1SneFPfhOJgyJ0=; b=MEBlSYQPYwVcM0rCOjj9B8M+hzn1Evz8SIvVCUdzPNcdA33WtzkJKgy7jrGpgaewoX eIyZUxmPIVBxYkjSM7bqLdK6eS8ebG7BIBO2HNR1iXPwFAkc3GVq2rNfR1n7rqUQQLps a9ZnIOkvEVKcGI8Q9uRpfbPHMQYqF1jUGXx6XoiVVOyGwbC20VUTaCb4RlJm2c1IQeNo /fsWutDwz2n8H0+0RXzyTPPRs5k25+U96S8J7CJtEvbvlKO/AH8XoMnXl5Th5WW9ywf4 TD6hPNHrRIx+lUS78ArUk8GHodwgCTguJtlQNUt9B8FZLGBwjJ+vHcCy63hf4XOYdcQJ qZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=R8M9aUSD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si23039188plb.158.2019.05.21.17.09.50; Tue, 21 May 2019 17:10:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=R8M9aUSD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727790AbfEVAH6 (ORCPT + 99 others); Tue, 21 May 2019 20:07:58 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:37154 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbfEVAH6 (ORCPT ); Tue, 21 May 2019 20:07:58 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 3E61D891AA; Wed, 22 May 2019 12:07:56 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1558483676; bh=b7vi3evCHUpG9dV383KMpTjNqi3Fn1SneFPfhOJgyJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R8M9aUSD1FTAVRNfnrEUw4AiKn7BYdJeZDYb+k+O0W/8RnPemSonF9fiTAdaR8JCK 5pcmTeC0yArLIfyKExGsUFKPXmWb2X3/3IrFHz4krQ4AIJPC3EOpfJei7MJFco22Lh XRg6KFYR3yY6TrSPsBw+medL2YpJuV5FWBxD1tdWCn7E49NTrCZ8J1ON81eyN9zrdr jlzggLasDzg+/ldM1uvz2AU5w6OazA0lKK8BpFJB1nb81LZ7m9j7jJ/vdsz4Y2f4Hf LY2e43vuSaxqkyq8TXKsAtjKzA+8U5NCdFgOrLuBLvbUbCgCrBb5M+PkTIMTwXuG0d Y8wV+N4WSdxlA== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Wed, 22 May 2019 12:07:56 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id 2DC8A13EF07; Wed, 22 May 2019 12:07:56 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 878251E1DDA; Wed, 22 May 2019 12:07:55 +1200 (NZST) From: Chris Packham To: dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH 2/2] mtd: concat: implement _is_locked mtd operation Date: Wed, 22 May 2019 12:07:53 +1200 Message-Id: <20190522000753.13300-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190522000753.13300-1-chris.packham@alliedtelesis.co.nz> References: <20190522000753.13300-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an implementation of the _is_locked operation for concatenated mtd devices. As with concat_lock/concat_unlock this can simply use the common helper and pass mtd_is_locked as the operation. Signed-off-by: Chris Packham --- drivers/mtd/mtdconcat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 9514cd2db63c..0e919f3423af 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -496,6 +496,11 @@ static int concat_unlock(struct mtd_info *mtd, loff_= t ofs, uint64_t len) return __concat_xxlock(mtd, ofs, len, mtd_unlock); } =20 +static int concat_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t l= en) +{ + return __concat_xxlock(mtd, ofs, len, mtd_is_locked); +} + static void concat_sync(struct mtd_info *mtd) { struct mtd_concat *concat =3D CONCAT(mtd); @@ -695,6 +700,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *s= ubdev[], /* subdevices to c concat->mtd._sync =3D concat_sync; concat->mtd._lock =3D concat_lock; concat->mtd._unlock =3D concat_unlock; + concat->mtd._is_locked =3D concat_is_locked; concat->mtd._suspend =3D concat_suspend; concat->mtd._resume =3D concat_resume; =20 --=20 2.21.0