1 From 0abdf99fe0c86252ba274703425f8d543d7e7f0d Mon Sep 17 00:00:00 2001
2 From: Miquel Raynal <miquel.raynal@bootlin.com>
3 Date: Tue, 4 Apr 2023 18:21:45 +0100
4 Subject: [PATCH] nvmem: layouts: sl28vpd: Use module_nvmem_layout_driver()
6 Stop open-coding the module init/exit functions. Use the
7 module_nvmem_layout_driver() instead.
9 Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
10 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11 Link: https://lore.kernel.org/r/20230404172148.82422-38-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 drivers/nvmem/layouts/sl28vpd.c | 14 +-------------
15 1 file changed, 1 insertion(+), 13 deletions(-)
17 --- a/drivers/nvmem/layouts/sl28vpd.c
18 +++ b/drivers/nvmem/layouts/sl28vpd.c
19 @@ -146,19 +146,7 @@ struct nvmem_layout sl28vpd_layout = {
20 .of_match_table = sl28vpd_of_match_table,
21 .add_cells = sl28vpd_add_cells,
24 -static int __init sl28vpd_init(void)
26 - return nvmem_layout_register(&sl28vpd_layout);
29 -static void __exit sl28vpd_exit(void)
31 - nvmem_layout_unregister(&sl28vpd_layout);
34 -module_init(sl28vpd_init);
35 -module_exit(sl28vpd_exit);
36 +module_nvmem_layout_driver(sl28vpd_layout);
38 MODULE_LICENSE("GPL");
39 MODULE_AUTHOR("Michael Walle <michael@walle.cc>");