diff mbox

[11/20] nvmem: meson-efuse: Convert to use devm_nvmem_register()

Message ID 20171227225956.14442-12-andrew.smirnov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrey Smirnov Dec. 27, 2017, 10:59 p.m. UTC
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: Joachim Eastwood <manabian@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/meson-efuse.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

kernel test robot Dec. 30, 2017, 6:38 a.m. UTC | #1
Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.15-rc5]
[cannot apply to next-20171222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20171230-114930
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

>> drivers/nvmem/meson-efuse.c:72:12: error: 'meson_efuse_remove' undeclared here (not in a function); did you mean 'meson_efuse_probe'?
     .remove = meson_efuse_remove,
               ^~~~~~~~~~~~~~~~~~
               meson_efuse_probe

vim +72 drivers/nvmem/meson-efuse.c

ad855eae Carlo Caione 2016-08-27  69  
ad855eae Carlo Caione 2016-08-27  70  static struct platform_driver meson_efuse_driver = {
ad855eae Carlo Caione 2016-08-27  71  	.probe = meson_efuse_probe,
ad855eae Carlo Caione 2016-08-27 @72  	.remove = meson_efuse_remove,
ad855eae Carlo Caione 2016-08-27  73  	.driver = {
ad855eae Carlo Caione 2016-08-27  74  		.name = "meson-efuse",
ad855eae Carlo Caione 2016-08-27  75  		.of_match_table = meson_efuse_match,
ad855eae Carlo Caione 2016-08-27  76  	},
ad855eae Carlo Caione 2016-08-27  77  };
ad855eae Carlo Caione 2016-08-27  78  

:::::: The code at line 72 was first introduced by commit
:::::: ad855eae6caf0d1dd17bce5bcd8e07759adc9903 nvmem: amlogic: Add Amlogic Meson EFUSE driver

:::::: TO: Carlo Caione <carlo@endlessm.com>
:::::: CC: Kevin Hilman <khilman@baylibre.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index a43c68f90937..02ec2873e583 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -60,22 +60,13 @@  static int meson_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = meson_efuse_read;
 	econfig.size = size;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int meson_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver meson_efuse_driver = {
 	.probe = meson_efuse_probe,
 	.remove = meson_efuse_remove,