summaryrefslogtreecommitdiff
path: root/drivers/fpga/dfl-fme-br.c
diff options
context:
space:
mode:
authorRuss Weight <russell.h.weight@intel.com>2021-11-18 17:55:52 -0800
committerMoritz Fischer <mdf@kernel.org>2021-11-28 14:02:13 -0800
commit0d70af3c2530a70f1b2c197feaa63fbd3548ce34 (patch)
tree59c77d021df097a8d8fc8129661d2b1533e222d8 /drivers/fpga/dfl-fme-br.c
parent4ba0b2c294fe691921271372f7b59e5cc2ce4b0f (diff)
fpga: bridge: Use standard dev_release for class driver
The FPGA bridge 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() function. 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>
Diffstat (limited to 'drivers/fpga/dfl-fme-br.c')
-rw-r--r--drivers/fpga/dfl-fme-br.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/fpga/dfl-fme-br.c b/drivers/fpga/dfl-fme-br.c
index 3ff9f3a687ce..808d1f4d76df 100644
--- a/drivers/fpga/dfl-fme-br.c
+++ b/drivers/fpga/dfl-fme-br.c
@@ -68,14 +68,14 @@ static int fme_br_probe(struct platform_device *pdev)
priv->pdata = dev_get_platdata(dev);
- br = devm_fpga_bridge_create(dev, "DFL FPGA FME Bridge",
- &fme_bridge_ops, priv);
- if (!br)
- return -ENOMEM;
+ br = fpga_bridge_register(dev, "DFL FPGA FME Bridge",
+ &fme_bridge_ops, priv);
+ if (IS_ERR(br))
+ return PTR_ERR(br);
platform_set_drvdata(pdev, br);
- return fpga_bridge_register(br);
+ return 0;
}
static int fme_br_remove(struct platform_device *pdev)