06646dd68bf67b2c39c357e9e658c7cc29d9c662
[openwrt/staging/neocturne.git] /
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()
5
6 Stop open-coding the module init/exit functions. Use the
7 module_nvmem_layout_driver() instead.
8
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>
13 ---
14 drivers/nvmem/layouts/sl28vpd.c | 14 +-------------
15 1 file changed, 1 insertion(+), 13 deletions(-)
16
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,
22 };
23 -
24 -static int __init sl28vpd_init(void)
25 -{
26 - return nvmem_layout_register(&sl28vpd_layout);
27 -}
28 -
29 -static void __exit sl28vpd_exit(void)
30 -{
31 - nvmem_layout_unregister(&sl28vpd_layout);
32 -}
33 -
34 -module_init(sl28vpd_init);
35 -module_exit(sl28vpd_exit);
36 +module_nvmem_layout_driver(sl28vpd_layout);
37
38 MODULE_LICENSE("GPL");
39 MODULE_AUTHOR("Michael Walle <michael@walle.cc>");