From patchwork Tue Nov 20 10:57:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 1000583 X-Patchwork-Delegate: miquel.raynal@bootlin.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PmVWFS/P"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="VIXHyCwI"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zr6S4ph2z9s7T for ; Wed, 21 Nov 2018 03:01:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DeZX63n1PrO7Qh7y2SlVqhE4IecRXZ+bVkLdhEJdxQk=; b=PmVWFS/PTZKtcoowtLvTZfhDHd plwci2zv3Ug8Xpe5T5i7e3R6Fp/Fqijvw/J85zCLsnJ/GAPCy+KyCiM73p8AtofYuH6Xxy5zmT00j 2QcMsVMNmE+5S0vUL8BVMOyumAbGVZlQ3qaM/MlmLB6M8YGUcOfFD2Iz+eQtw+10QHLMJmaul4JFS thuR1G5THSvcbv8wEBJSzx5Pvd/MOsPDQ4iRG0E1hvtXqxZIT7ER+M3Vu5NUzT/dp/5/7ItEy2aSi oRO9YNXME52fewBwt/Bg+t+HVfr0mfJ2ZI/fnaVPbW1eLaGBXNtrIU2ZE69oekMMWK81GMyqH8w0h 76x7qkSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8Si-0005tS-0u; Tue, 20 Nov 2018 16:01:16 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8GM-0003nl-Dd for linux-mtd@bombadil.infradead.org; Tue, 20 Nov 2018 15:48:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; 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=lWNGTLG7Ou4exTMfRq60u8PXjNPpxpWuGLtXxU+/n3c=; b=VIXHyCwI4T6kWk88b0zGC7ruO Cx/2JTOQvmgXNpWTJiX3UJ2hiC+9lSAO51t/iRgGy7SEL+SAiB65krZ1aG0yOcSNnql9Qg/be6nbQ CL4YqmMQttI3O/QkrNbTBT7QR2aeaPmaGKBBp3vCsTxpeRrtCheqJvmi252ECUl3XmRd1s3DNFtfZ AfZp2LrsOmexb5ON/dcID4B0fw+zQSj7nzd+YZ/NHlHGeZP/rxvCWnwUSZPMWirnNG5zs7S61J8wp Ya8EFDv4BecjuUGcB7MCrDVpfAyPwuVr7L2lOOY0U9tf1ta7G5i+GVcwE8D+AAXxMsgM3l9sPvnR5 kGpoQwB/Q==; Received: from mail.bootlin.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP3iy-0006nz-01 for linux-mtd@lists.infradead.org; Tue, 20 Nov 2018 10:57:45 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 5E7D320D31; Tue, 20 Nov 2018 11:57:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost.localdomain (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 15CC3206A1; Tue, 20 Nov 2018 11:57:23 +0100 (CET) From: Boris Brezillon To: Boris Brezillon , Richard Weinberger , Miquel Raynal , linux-mtd@lists.infradead.org Subject: [RFC PATCH 1/5] mtd: rawnand: mtk: Use nand_controller_init() instead of open-coding it Date: Tue, 20 Nov 2018 11:57:16 +0100 Message-Id: <20181120105720.23081-2-boris.brezillon@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120105720.23081-1-boris.brezillon@bootlin.com> References: <20181120105720.23081-1-boris.brezillon@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_055744_567202_81A3E84C X-CRM114-Status: GOOD ( 12.28 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Levitsky , Marek Vasut , Matthias Brugger , Xiaolei Li , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org nand_controller_init() has been added to simplify nand_controller struct initialization. Use this function instead of duplicating the logic. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/mtk_nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c index b6b4602f5132..2c0e09187773 100644 --- a/drivers/mtd/nand/raw/mtk_nand.c +++ b/drivers/mtd/nand/raw/mtk_nand.c @@ -1451,8 +1451,7 @@ static int mtk_nfc_probe(struct platform_device *pdev) if (!nfc) return -ENOMEM; - spin_lock_init(&nfc->controller.lock); - init_waitqueue_head(&nfc->controller.wq); + nand_controller_init(&nfc->controller); INIT_LIST_HEAD(&nfc->chips); nfc->controller.ops = &mtk_nfc_controller_ops;