summaryrefslogtreecommitdiff
path: root/drivers/fpga/machxo2-spi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-28 14:20:15 +0000
committerMark Brown <broonie@kernel.org>2020-12-28 14:20:15 +0000
commit8db90aa36063f471bea1e65e23185913043852dc (patch)
tree32f765852c4663ae28751bd2ab32463da6591701 /drivers/fpga/machxo2-spi.c
parenta590370d918fc66c62df6620445791fbe840344a (diff)
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
Merge tag 'v5.11-rc1' into spi-5.11
Linux 5.11-rc1
Diffstat (limited to 'drivers/fpga/machxo2-spi.c')
-rw-r--r--drivers/fpga/machxo2-spi.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c
index b316369156fe..114a64d2b7a4 100644
--- a/drivers/fpga/machxo2-spi.c
+++ b/drivers/fpga/machxo2-spi.c
@@ -371,18 +371,7 @@ static int machxo2_spi_probe(struct spi_device *spi)
if (!mgr)
return -ENOMEM;
- spi_set_drvdata(spi, mgr);
-
- return fpga_mgr_register(mgr);
-}
-
-static int machxo2_spi_remove(struct spi_device *spi)
-{
- struct fpga_manager *mgr = spi_get_drvdata(spi);
-
- fpga_mgr_unregister(mgr);
-
- return 0;
+ return devm_fpga_mgr_register(dev, mgr);
}
static const struct of_device_id of_match[] = {
@@ -403,7 +392,6 @@ static struct spi_driver machxo2_spi_driver = {
.of_match_table = of_match_ptr(of_match),
},
.probe = machxo2_spi_probe,
- .remove = machxo2_spi_remove,
.id_table = lattice_ids,
};