Re: [PATCH v3 17/20] nvmem: layouts: sl28vpd: Add new layout driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/03/2023 11:16, Miquel Raynal wrote:
Hi Srinivas,

srinivas.kandagatla@xxxxxxxxxx wrote on Fri, 10 Mar 2023 11:03:45 +0000:

On 08/03/2023 15:31, Miquel Raynal wrote:
+
+static int __init sl28vpd_init(void)
+{
+	return nvmem_layout_register(&sl28vpd_layout);
+}
+
+static void __exit sl28vpd_exit(void)
+{
+	nvmem_layout_unregister(&sl28vpd_layout);
+}
+
+module_init(sl28vpd_init);
+module_exit(sl28vpd_exit);
Looking at this pattern in two drivers, we could come up with some helper macro like.

#define module_nvmem_layout_driver(__layout_driver) \
          module_driver(__layout_driver, nvmem_layout_register, \
                          nvmem_layout_unregister)

Nice idea! I will make a patch; is it okay do it on top?
sounds good

--srini

Thanks,
Miquèl



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux