From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Carlo Caione <carlo@caione.org>,
Kevin Hilman <khilman@baylibre.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
cphealy@gmail.com, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 14/21] nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
Date: Thu, 8 Mar 2018 11:11:58 -0800 [thread overview]
Message-ID: <20180308191205.26943-15-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180308191205.26943-1-andrew.smirnov@gmail.com>
Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
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 <andrew.smirnov@gmail.com>
---
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,
--
2.14.3
next prev parent reply other threads:[~2018-03-08 19:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 19:11 [PATCH v5 00/21] Verbatim device names and devm_nvmem_(un)register() Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 01/21] nvmem: Document struct nvmem_config Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 02/21] nvmem: core: Allow specifying device name verbatim Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 03/21] nvmem: Introduce devm_nvmem_(un)register() Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 04/21] nvmem: vf610-ocotp: Convert to use devm_nvmem_register() Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 05/21] nvmem: imx-ocotp: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 06/21] nvmem: uniphier-efuse: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 07/21] nvmem: snvs_lgpr: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 08/21] nvmem: rockchip-efuse: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 09/21] nvmem: mtk-efuse: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 10/21] nvmem: meson-mx-efuse: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 11/21] nvmem: meson-efuse: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 12/21] nvmem: lpc18xx_otp: " Andrey Smirnov
2018-03-08 19:11 ` [PATCH v5 13/21] nvmem: imx-iim: " Andrey Smirnov
2018-03-08 19:11 ` Andrey Smirnov [this message]
2018-03-08 19:11 ` [PATCH v5 15/21] nvmem: qfprom: " Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 16/21] nvmem: snvs_lpgpr: Convert commas to semicolons Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 17/21] nvmem: rockchip-efuse: Make use of of_device_get_match_data() Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 18/21] nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 19/21] nvmem: rockchip-efuse: " Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 20/21] nvmem: imx-iim: " Andrey Smirnov
2018-03-08 19:12 ` [PATCH v5 21/21] nvmem: bcm-ocotp: " Andrey Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180308191205.26943-15-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=carlo@caione.org \
--cc=cphealy@gmail.com \
--cc=heiko@sntech.de \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).