From patchwork Wed Dec 27 22:59:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10134185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4522060318 for ; Wed, 27 Dec 2017 23:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 377DE2CA80 for ; Wed, 27 Dec 2017 23:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C3ED2D479; Wed, 27 Dec 2017 23:03:46 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3BB62CA80 for ; Wed, 27 Dec 2017 23:03:45 +0000 (UTC) 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=6Amr38FALG/x02HPDmTgf/X8vCEgVRSM8ofdtvbx69k=; b=p299pxCAxXI7Vz03CNaTL5Xyk5 MjF14Yd/nD3VX0K2VvjM5Dp88iJ6JCufP9P0Juy0XpBBS9kSLiuPe9wxJyW1hKBmaQEa1tOzlPybN Iz2omddmOwZWI7nj0/ZNAf0B1MukbT7C1hqLUj1Gqw49dwPsBBhv+16gz/Mh1Z8SYOUQ8jFPtQxD+ Rg8L7JdundJrmVCarvfNM+iscHFdgsFIso5pHw3Lb4r+XvAY03KbyKDdx9Cd6iyiuTkOhNmTV2pox ZPFtGroEKuX5Nl0Wep1Wb4OQVYMnuG4RSziSqzJbB58PW/Srr9x2qYZLA72ChrNWSmBX9IYuoYqeg ppJrLs1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUKjc-0006PZ-5L; Wed, 27 Dec 2017 23:03:40 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eUKgc-0004Su-Hl; Wed, 27 Dec 2017 23:00:50 +0000 Received: by mail-pf0-x244.google.com with SMTP id m26so20265423pfj.11; Wed, 27 Dec 2017 15:00:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zQRw1knWdXiu1qRsOdUfDi8ipic/A1rUdy19UE/VTfk=; b=hIqOWPswyo/YHmwRKqBrTg4RgVZ9Ma/ik9DQUP4Q4sCqcw/yKmpmYkhSZGItGc2fLj 73AMwm4JwXkS5hY79mh/tlaKNFRA/3s1J80M0P1tbPbBV2ibs4GGeN7PaQHhaXg/IfDS HNvf2a9bNAxjcUysSgjjavLqDIjR7OFotMW49/1dxq9KBggUvj0avLS2WHNV81CxDJIt yKF225VMk49WQwfPFqcbP079SQbgeCL2489X86xZfqfwkva0vMCg91SSDOk4pg1/GFDO VkMqlZBPrUd0GglkUIT/u99r7o2Vx0JFbLr6Zye5lUa25Up4O+n3blJ0z1G/5MMl5pdd j3dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zQRw1knWdXiu1qRsOdUfDi8ipic/A1rUdy19UE/VTfk=; b=e6EoMpSym1dm/n/jInRBsWsof4DOp1qtb3RY47OkSFuAJ+7HiOTPGJuINxW8YwIHiS JK/DtlwdD1T9Rp7N0vXW7H6h54+iQjqqWwGHuyKvnLbp+8bNYHhH+XV44gbVcww6DCsM AMb/9Ss9vR4nDpFWAd6xUEfOR6bafErPpicaP6svsDqFLrXahxb1OJ6vam0ZUIpNyv3H AIE19LqkbrX5eSQJdJLajQOLkXdwnaiRUDqrHeOLrXEtol+Yz/HOKLJXFlCmwfYwLDxf fXUv4x8cN8dzIINZDETV53R5I3d8lB1h3ILyVlXchQNqdikTrwJUMzM2QbjhWb9G3vxB dFXQ== X-Gm-Message-State: AKGB3mLLPdneX42p/RDVDyAmc2uVsf//QuJKE7Vl6JWgGq2OQUPWpXzw bvFgxXWYlSujnal15wY3CTs= X-Google-Smtp-Source: ACJfBosgMCg2OzbHSDIC0ChwE/m3gPD9rBQ/pDx3msNyvwc9kieZEaNMusDsuBTdkMgFK14AaKuMjw== X-Received: by 10.99.97.70 with SMTP id v67mr25121271pgb.300.1514415623311; Wed, 27 Dec 2017 15:00:23 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id l19sm27810326pgc.57.2017.12.27.15.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Dec 2017 15:00:22 -0800 (PST) From: Andrey Smirnov To: Srinivas Kandagatla Subject: [PATCH 07/20] nvmem: rockchip-efuse: Convert to use devm_nvmem_register() Date: Wed, 27 Dec 2017 14:59:43 -0800 Message-Id: <20171227225956.14442-8-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171227225956.14442-1-andrew.smirnov@gmail.com> References: <20171227225956.14442-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171227_150035_173788_C529AF86 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, Andrey Smirnov , Kevin Hilman , Joachim Eastwood , linux-kernel@vger.kernel.org, Masahiro Yamada , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , linux-amlogic@lists.infradead.org, Carlo Caione , cphealy@gmail.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: Joachim Eastwood Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov --- drivers/nvmem/rockchip-efuse.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c index 123de77ca5d6..d6dc1330f895 100644 --- a/drivers/nvmem/rockchip-efuse.c +++ b/drivers/nvmem/rockchip-efuse.c @@ -221,25 +221,15 @@ static int rockchip_efuse_probe(struct platform_device *pdev) econfig.reg_read = match->data; econfig.priv = efuse; econfig.dev = efuse->dev; - nvmem = nvmem_register(&econfig); + nvmem = devm_nvmem_register(dev, &econfig); if (IS_ERR(nvmem)) return PTR_ERR(nvmem); - platform_set_drvdata(pdev, nvmem); - return 0; } -static int rockchip_efuse_remove(struct platform_device *pdev) -{ - struct nvmem_device *nvmem = platform_get_drvdata(pdev); - - return nvmem_unregister(nvmem); -} - static struct platform_driver rockchip_efuse_driver = { .probe = rockchip_efuse_probe, - .remove = rockchip_efuse_remove, .driver = { .name = "rockchip-efuse", .of_match_table = rockchip_efuse_match,