]> Git Repo - J-linux.git/blobdiff - drivers/fpga/machxo2-spi.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[J-linux.git] / drivers / fpga / machxo2-spi.c
index b316369156fe6b5087916c63484568c3901f9085..114a64d2b7a4d68f81b50f73f9c38446a370d3d5 100644 (file)
@@ -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,
 };
 
This page took 0.026912 seconds and 4 git commands to generate.