From patchwork Fri Mar 9 14:47:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10270911 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 62A7160594 for ; Fri, 9 Mar 2018 15:09:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 539B9287D4 for ; Fri, 9 Mar 2018 15:09:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47A6D29E38; Fri, 9 Mar 2018 15:09:00 +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=unavailable 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 E907B287D4 for ; Fri, 9 Mar 2018 15:08:59 +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=V5S5IbV8M6fiFfxnZdKuNSNJROUtca8PrgUbmXJ2y4g=; b=he13zeJL9kYS73qyRyjJexEjR8 8LN72bToZWvTWLmnxzx3XBlpxh8fxLfn+GJe+fCWvNWpUJ0WUgs7hAdaHhVYjkkwuJXOMT5dO/U9B EdZ4C5bFpyysGENwSqna3ZsqMSnQdqkTZjU0XTMlskbTQXBVSbGgLnyL5fr2wCnsEcC48YPr5IOtJ i/02Kb0BNMi9QZ+L3g267tzhz0XtM9p55ES2mZi/+pZ73J76ob/s0efSSBOeX4TKaP50kbPKpVMed ZtLxyMV9EcudpB7XbTKrhyy8iGFjqbWvR+jChW4hXI63uBLRJIFPFKyJaXmYLZ0yXT7ov5lKJ7UYo UpDSiF4w==; 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 1euJdg-0003oW-23; Fri, 09 Mar 2018 15:08:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euJbX-0002Ui-Fz for linux-amlogic@bombadil.infradead.org; Fri, 09 Mar 2018 15:06:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=iUanzWQSXWeBvkXCvc41usxvXwyGqv6365hkQYXbiXU=; b=Wipe4rl3e0xPj0bMK4CRVCLWV llk+rhOXpmk2C81oeXmpmXEJajyMXYndsFfiMyyDT/3l447RdOOLrcscYYn5tSbQJp0NaQqR8H8X2 vr7E6+ZDHHSICwiKAe7g5ol53kJZqzKu9ZjsGqO3nLVRHnppEslWaRaQ0MSgXaKwPK16AxuQIODGy lClkjQFxQ9TS6eVXfzg5gXVMPr460diSTc21KY5PHOTggQwdHDgDLfuwR8UaqNlyuRCPFt8OuQPWb CWgZf9qS09mDVupRUnlsNAZQoKHWrjJnLrZyIJ7sAmRCEqUhTUcs7vzcqJW4TcuM3Q4Wo8pEaljoE i5aDpXf+A==; Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euJM4-0005YW-8r for linux-amlogic@lists.infradead.org; Fri, 09 Mar 2018 14:50:49 +0000 Received: by mail-wr0-x244.google.com with SMTP id v65so9264350wrc.11 for ; Fri, 09 Mar 2018 06:50:33 -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=iUanzWQSXWeBvkXCvc41usxvXwyGqv6365hkQYXbiXU=; b=Q+XtcRfoMzwbeBH7rs3ZzfgZuEdme83w+iTpMLXwN7IB3/U6Rdi4Cva45cbFUUzhV5 y9yKSl0zyeHhRYw+hvlZ9kNVeQBYgRJc6XWYc7/LlpXxU575xdFd+f3QNQoxRPXCmRNB J7b+MjNU/3mWFN3JzDm5yWl0e6VR+WDMeNjKY= 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=iUanzWQSXWeBvkXCvc41usxvXwyGqv6365hkQYXbiXU=; b=UsG66FXyZDF5C4BfDPJzl9VJcT1K2He4DF/vCaUc6COxXseTXgo7wkY3aw2+cifNLh D9fsa4qt8ttG2Rq+J/QSfUT+4zxtdiGHxd+417QT7rYpYmdV+l6kMKZyNAyYYjkbNTUM jbGsSvWFyN3HL+uqkkD7s+W2YlulqTig5dOxyifE0t8Ghno4VCjWoqTq2wXERSwgWxr8 ux2j3dD4wJ/eXxCn13IGqBsxRAqueBSWe542M1Pj35Fc4vG160iVF/ITUgypnSU8nsbM IJOZctfIWDIKA6Tr71VDerlJJvoy/KE3G/zZgj/BW5eaIS8vg6LA21+kbA9stUhucV5y rG/A== X-Gm-Message-State: APf1xPB7oLLkuccoJpCZZhqcc+0U9iMAXOSkd3srPFj8GjTXpPQ3OLzV 0hx3CjVRoYKKa3U3A+jlqETFBQ== X-Google-Smtp-Source: AG47ELtopU3iaoCLCEpjl2s+e6B9pbQ+XCS6hUCD5SBl56NbZMvziTpOdNBIeXB0c1G6FUU9wN3VvA== X-Received: by 10.223.187.68 with SMTP id x4mr24580707wrg.80.1520607032756; Fri, 09 Mar 2018 06:50:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 06:50:32 -0800 (PST) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Subject: [PATCH 06/25] nvmem: uniphier-efuse: Convert to use devm_nvmem_register() Date: Fri, 9 Mar 2018 14:47:00 +0000 Message-Id: <20180309144719.29904-7-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_145044_352974_34E43622 X-CRM114-Status: GOOD ( 15.70 ) 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/uniphier-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c index be11880a1358..271f0b2ff86a 100644 --- a/drivers/nvmem/uniphier-efuse.c +++ b/drivers/nvmem/uniphier-efuse.c @@ -60,20 +60,9 @@ static int uniphier_efuse_probe(struct platform_device *pdev) econfig.size = resource_size(res); econfig.priv = priv; econfig.dev = dev; - nvmem = nvmem_register(&econfig); - if (IS_ERR(nvmem)) - return PTR_ERR(nvmem); + nvmem = devm_nvmem_register(dev, &econfig); - platform_set_drvdata(pdev, nvmem); - - return 0; -} - -static int uniphier_efuse_remove(struct platform_device *pdev) -{ - struct nvmem_device *nvmem = platform_get_drvdata(pdev); - - return nvmem_unregister(nvmem); + return PTR_ERR_OR_ZERO(nvmem); } static const struct of_device_id uniphier_efuse_of_match[] = { @@ -84,7 +73,6 @@ MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match); static struct platform_driver uniphier_efuse_driver = { .probe = uniphier_efuse_probe, - .remove = uniphier_efuse_remove, .driver = { .name = "uniphier-efuse", .of_match_table = uniphier_efuse_of_match,