fpga: region: make fpga_region_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Fri, 11 Aug 2023 07:30:43 +0000 (11:30 +0400)
committerXu Yilun <yilun.xu@intel.com>
Fri, 11 Aug 2023 15:04:21 +0000 (23:04 +0800)
commit1a22ec09a2c1d367a43cb7f837c7a8719e7fe975
tree7f597875efb611812750bdcd661400858485d5b5
parent909960e2e29d9ebda8ef303e338e43c03b3d1faf
fpga: region: make fpga_region_class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, move the fpga_region_class structure to be declared at build
time placing it into read-only memory, instead of having to be
dynamically allocated at boot time.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20230811073043.52808-3-ivan.orlov0322@gmail.com
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
drivers/fpga/fpga-region.c