From patchwork Fri Mar 9 14:47:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10271211 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 401E26016D for ; Fri, 9 Mar 2018 16:44:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EC0929E5B for ; Fri, 9 Mar 2018 16:44:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CBB229E54; Fri, 9 Mar 2018 16:44:37 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 B80DA29F46 for ; Fri, 9 Mar 2018 16:43:48 +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=JcZCI0E03EduyjOT7MIvX6CCT3HnPEGaabRXU6CZjVk=; b=TBWUVnrzcqZv9TaFjBHRA4ZnE3 ufSPpNDqRn+kAeP/tadqe4nLm4XCae8rdh84gxMjh2XvhLfyrLrL7hRrbmPz6ltrYoBnnjbpDncTE Xkmip6mW4NC/oyMxygMZSyn3txLcpWNgD+olB+cM4R+IOPC2CFyNnBtb8xsXvXJZTaGPYqCR+1PFM tblsqzsJAs79yx1l8oE+2UyoiLGgFXKRpg4yWA+v9RJoyR4kWwTs+iFPyJ2+gwGfgznsJSmm1n8Sg B7QzWySBfyGl+r0qPmEL00TFbINoj7Dx/UITTaAmrAKV1Owbc3wwqxDbV5VZOj4UcI/ed2b039kaF zrT5LT/Q==; 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 1euL7R-0000AF-5W; Fri, 09 Mar 2018 16:43:45 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euL61-0007Q8-IX for linux-amlogic@bombadil.infradead.org; Fri, 09 Mar 2018 16:42:17 +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=cX9nl+YTq+v5dxz2HWkpxIJ479dHsg9YyJ8aO5HY8eU=; b=c2w1JuJmQH19POoGd5V9kUqXD qsLEmPMqNz/MSzmmnBmfLzUxi86328iZ9gc4QNO9rrVv/oLQzrlhfdtzm0v5eQ2XA5K6IFWugTQyZ bui1CFQF6AQvI1JgjpJc2wvi6srZ8mOdd60ZM45d9Gy5leSBZhfrPsu0Rl5b4dYyXPM+O8ke296w8 tgSZlK9tt3wRT3dsPD2OCLs4tTW020QLLX4/MPPoCZ/AzceYiZ7wnqVlzZ+ndixVyr5XuOvuAbT5J Ot+mbArnGHbg7tfWoKKUAWJCCqx6gk2UUgp56ItqiYO3U/zeQHbC+tcEnKgoHnYmOTTrEAD1RSVoo ZdsW2h/2g==; Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euJME-0005xp-3T for linux-amlogic@lists.infradead.org; Fri, 09 Mar 2018 14:50:56 +0000 Received: by mail-wm0-x243.google.com with SMTP id z9so4346443wmb.3 for ; Fri, 09 Mar 2018 06:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cX9nl+YTq+v5dxz2HWkpxIJ479dHsg9YyJ8aO5HY8eU=; b=IuoHpl5J63h6V7nEL9wQ/UCSa4a8cw3FtTdMWyAtHwpE/8MdXKxvuqkiTzEDD4ELbc 6fO9mcRg266NixPhfbcLtJ64K+jnLTRO9uDypvkIwnwnUp8Zawe01uGwz1HDPDgUELUh mEaE0wSUC8/NWLpZTJjRM8+IEl9Zw8uV04Z0A= 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=cX9nl+YTq+v5dxz2HWkpxIJ479dHsg9YyJ8aO5HY8eU=; b=Yr6cO9i1RFodVDYAkW5iHscwox9HsSPWdP3RzHSXmjSc0QV45roKJpDiVckIDf/4xr yDDn1uv1zgp8SEjrLsGCk66GjF+OQ/Y7NMhVf+DY5WWn9mgeb3jxzCaN7BnHaDd7CxT7 rF/1paW43QQs1gKR1WrAtT5fr60nTO8ZM6avDM25CkNWkaC7/XgegqBMANrjyp6+0QtR oHSSuqGt8FLrfkgGrehww7I2g18xLliUSqqHxebBnOBMUV+nKvWQaoqYp8zn4K+OGUyR /FHkUCCXmiQKqRVvi34uAc+FFlhz0I3W7ciwUWgFRmdk1R6XkUaSIqIgy32uS+g/e0Ji rWdg== X-Gm-Message-State: AElRT7Ep+7N18yiWzyK3V1+C/5hBt3BhnvWO/UHxvTSvHfY1HYGL4R8o vt/LFKOZ1PEY+Vz8dMnty7QlwA== X-Google-Smtp-Source: AG47ELuaTyGH4foMSPJS4Hpdv7EEys7ly4/dK9aVTuEupVYznC+DNfqlxIJY9SvrjhuRGUjGT++c3A== X-Received: by 10.28.231.10 with SMTP id e10mr2392547wmh.125.1520607042060; Fri, 09 Mar 2018 06:50:42 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id u48sm1191901wrb.85.2018.03.09.06.50.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 06:50:41 -0800 (PST) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Subject: [PATCH 14/25] nvmem: bcm-ocotp: Convert to use devm_nvmem_register() Date: Fri, 9 Mar 2018 14:47:08 +0000 Message-Id: <20180309144719.29904-15-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180309144719.29904-1-srinivas.kandagatla@linaro.org> References: <20180309144719.29904-1-srinivas.kandagatla@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180309_095054_270216_828EB2B9 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, Andrey Smirnov , Kevin Hilman , linux-kernel@vger.kernel.org, Masahiro Yamada , srinivas.kandagatla@linaro.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Carlo Caione , linux-mediatek@lists.infradead.org, cphealy@gmail.com, Matthias Brugger MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrey Smirnov 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: 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 Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/bcm-ocotp.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c index 5e9e324427f9..24c30fa475cc 100644 --- a/drivers/nvmem/bcm-ocotp.c +++ b/drivers/nvmem/bcm-ocotp.c @@ -302,27 +302,17 @@ static int bcm_otpc_probe(struct platform_device *pdev) priv->config = &bcm_otpc_nvmem_config; - nvmem = nvmem_register(&bcm_otpc_nvmem_config); + nvmem = devm_nvmem_register(dev, &bcm_otpc_nvmem_config); if (IS_ERR(nvmem)) { dev_err(dev, "error registering nvmem config\n"); return PTR_ERR(nvmem); } - platform_set_drvdata(pdev, nvmem); - return 0; } -static int bcm_otpc_remove(struct platform_device *pdev) -{ - struct nvmem_device *nvmem = platform_get_drvdata(pdev); - - return nvmem_unregister(nvmem); -} - static struct platform_driver bcm_otpc_driver = { .probe = bcm_otpc_probe, - .remove = bcm_otpc_remove, .driver = { .name = "brcm-otpc", .of_match_table = bcm_otpc_dt_ids,