diff options
author | Russ Weight <russell.h.weight@intel.com> | 2021-11-19 02:55:52 +0100 |
---|---|---|
committer | Moritz Fischer <mdf@kernel.org> | 2021-11-28 23:02:13 +0100 |
commit | 0d70af3c2530a70f1b2c197feaa63fbd3548ce34 (patch) | |
tree | 59c77d021df097a8d8fc8129661d2b1533e222d8 /drivers/fpga/altera-freeze-bridge.c | |
parent | fpga: mgr: Use standard dev_release for class driver (diff) | |
download | linux-0d70af3c2530a70f1b2c197feaa63fbd3548ce34.tar.xz linux-0d70af3c2530a70f1b2c197feaa63fbd3548ce34.zip |
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/altera-freeze-bridge.c')
-rw-r--r-- | drivers/fpga/altera-freeze-bridge.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c index 7d22a44d652e..445f4b011167 100644 --- a/drivers/fpga/altera-freeze-bridge.c +++ b/drivers/fpga/altera-freeze-bridge.c @@ -246,14 +246,14 @@ static int altera_freeze_br_probe(struct platform_device *pdev) priv->base_addr = base_addr; - br = devm_fpga_bridge_create(dev, FREEZE_BRIDGE_NAME, - &altera_freeze_br_br_ops, priv); - if (!br) - return -ENOMEM; + br = fpga_bridge_register(dev, FREEZE_BRIDGE_NAME, + &altera_freeze_br_br_ops, priv); + if (IS_ERR(br)) + return PTR_ERR(br); platform_set_drvdata(pdev, br); - return fpga_bridge_register(br); + return 0; } static int altera_freeze_br_remove(struct platform_device *pdev) |