fpga: region: Use standard dev_release for class driver
authorRuss Weight <russell.h.weight@intel.com>
Fri, 19 Nov 2021 01:55:53 +0000 (17:55 -0800)
committerMoritz Fischer <mdf@kernel.org>
Sun, 28 Nov 2021 22:02:41 +0000 (14:02 -0800)
commit8886a579744fbfa53e69aa453ed10ae3b1f9abac
tree76f7e8e3349ebd0f94e811811ef959f5696b1a37
parent0d70af3c2530a70f1b2c197feaa63fbd3548ce34
fpga: region: Use standard dev_release for class driver

The FPGA region class driver data structure is being treated as a
managed resource instead of using the standard dev_release call-back
function to release the class data structure. This change removes the
managed resource code and combines the create() and register()
functions into a single register() or register_full() function.

The register_full() function accepts an info data structure to provide
flexibility in passing optional parameters. The register() function
supports the current parameter list for users that don't require the
use of optional parameters.

Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Documentation/driver-api/fpga/fpga-region.rst
drivers/fpga/dfl-fme-region.c
drivers/fpga/dfl.c
drivers/fpga/fpga-region.c
drivers/fpga/of-fpga-region.c
include/linux/fpga/fpga-region.h