]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fpga: dfl: return platform data from dfl_fpga_inode_to_feature_dev_data()
authorPeter Colberg <peter.colberg@intel.com>
Wed, 20 Nov 2024 01:10:18 +0000 (20:10 -0500)
committerXu Yilun <yilun.xu@linux.intel.com>
Tue, 10 Dec 2024 06:54:49 +0000 (14:54 +0800)
commitd4970a9d9ba3c7d51a3fad91b6db09577af5bafe
tree514bc2bb4c1c637cbf4219a637d45a24f981cb11
parent958d8c70024e6123f85b46f60dcb889c60e6bcff
fpga: dfl: return platform data from dfl_fpga_inode_to_feature_dev_data()

Refactor dfl_fpga_inode_to_feature_dev() to directly return the feature
device platform data instead of the platform device, and retrieve the
device from the data. The null pointer checks are not needed since the
platform device is guaranteed to have associated feature device data.

This patch is part of a refactoring of the internal DFL APIs to move
the feature device data into a new struct dfl_feature_dev_data which
lifetime is independent of the corresponding platform device.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20241120011035.230574-3-peter.colberg@intel.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
drivers/fpga/dfl-afu-main.c
drivers/fpga/dfl-fme-main.c
drivers/fpga/dfl.h