diff mbox series

[v5,16/18] fpga: dfl: remove unneeded function build_info_create_dev()

Message ID 20241120011035.230574-17-peter.colberg@intel.com (mailing list archive)
State New
Headers show
Series fpga: dfl: fix kernel warning on port release/assign for SRIOV | expand

Commit Message

Peter Colberg Nov. 20, 2024, 1:10 a.m. UTC
Remove the function build_info_create_dev(), which no longer serves its
original purpose now that the allocation of the platform device has been
moved to feature_dev_register().

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>
---
Changes since v4:
- Revise commit description to be confirmative, from (the function)
  "may be removed" to "Remove the function".

Changes since v3:
- New patch extracted from last patch of v3 series.
---
 drivers/fpga/dfl.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
index 91f12272da3e..203b14e292b4 100644
--- a/drivers/fpga/dfl.c
+++ b/drivers/fpga/dfl.c
@@ -858,16 +858,6 @@  binfo_create_feature_dev_data(struct build_feature_devs_info *binfo)
 	return fdata;
 }
 
-static int
-build_info_create_dev(struct build_feature_devs_info *binfo)
-{
-	binfo->feature_num = 0;
-
-	INIT_LIST_HEAD(&binfo->sub_features);
-
-	return 0;
-}
-
 /*
  * register current feature device, it is called when we need to switch to
  * another feature parsing or we have parsed all features on given device
@@ -1326,11 +1316,8 @@  static int parse_feature_fiu(struct build_feature_devs_info *binfo,
 		return -EINVAL;
 
 	binfo->type = type;
-
-	/* create platform device for dfl feature dev */
-	ret = build_info_create_dev(binfo);
-	if (ret)
-		return ret;
+	binfo->feature_num = 0;
+	INIT_LIST_HEAD(&binfo->sub_features);
 
 	ret = create_feature_instance(binfo, 0, 0, 0);
 	if (ret)