diff options
| author | Alan Tull <[email protected]> | 2018-10-15 22:20:01 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-10-16 09:13:50 +0000 |
| commit | 084181fe8cc7472695b907f0018f4cd00934cb12 (patch) | |
| tree | 812b6c10de92d91bccfdec2da621abacc2745c4d /drivers/fpga/ice40-spi.c | |
| parent | hv_balloon: Replace spin_is_locked() with lockdep (diff) | |
| download | kernel-084181fe8cc7472695b907f0018f4cd00934cb12.tar.gz kernel-084181fe8cc7472695b907f0018f4cd00934cb12.zip | |
fpga: mgr: add devm_fpga_mgr_create
Add devm_fpga_mgr_create() which is the managed
version of fpga_mgr_create().
Change current FPGA manager drivers to use
devm_fpga_mgr_create()
Signed-off-by: Alan Tull <[email protected]>
Suggested-by: Federico Vaga <[email protected]>
Acked-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/ice40-spi.c')
| -rw-r--r-- | drivers/fpga/ice40-spi.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c index 5981c7ee7a7d..6154661b8f76 100644 --- a/drivers/fpga/ice40-spi.c +++ b/drivers/fpga/ice40-spi.c @@ -175,18 +175,14 @@ static int ice40_fpga_probe(struct spi_device *spi) return ret; } - mgr = fpga_mgr_create(dev, "Lattice iCE40 FPGA Manager", - &ice40_fpga_ops, priv); + mgr = devm_fpga_mgr_create(dev, "Lattice iCE40 FPGA Manager", + &ice40_fpga_ops, priv); if (!mgr) return -ENOMEM; spi_set_drvdata(spi, mgr); - ret = fpga_mgr_register(mgr); - if (ret) - fpga_mgr_free(mgr); - - return ret; + return fpga_mgr_register(mgr); } static int ice40_fpga_remove(struct spi_device *spi) |
