diff options
-rw-r--r-- | drivers/fpga/dfl-fme-region.c | 4 | ||||
-rw-r--r-- | drivers/fpga/of-fpga-region.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl-fme-region.c index 0b7e19c27c6d..51a5ac2293a7 100644 --- a/drivers/fpga/dfl-fme-region.c +++ b/drivers/fpga/dfl-fme-region.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/fpga/fpga-mgr.h> | ||
17 | #include <linux/fpga/fpga-region.h> | 18 | #include <linux/fpga/fpga-region.h> |
18 | 19 | ||
19 | #include "dfl-fme-pr.h" | 20 | #include "dfl-fme-pr.h" |
@@ -66,9 +67,10 @@ eprobe_mgr_put: | |||
66 | static int fme_region_remove(struct platform_device *pdev) | 67 | static int fme_region_remove(struct platform_device *pdev) |
67 | { | 68 | { |
68 | struct fpga_region *region = dev_get_drvdata(&pdev->dev); | 69 | struct fpga_region *region = dev_get_drvdata(&pdev->dev); |
70 | struct fpga_manager *mgr = region->mgr; | ||
69 | 71 | ||
70 | fpga_region_unregister(region); | 72 | fpga_region_unregister(region); |
71 | fpga_mgr_put(region->mgr); | 73 | fpga_mgr_put(mgr); |
72 | 74 | ||
73 | return 0; | 75 | return 0; |
74 | } | 76 | } |
diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c index 35fabb8083fb..052a1342ab7e 100644 --- a/drivers/fpga/of-fpga-region.c +++ b/drivers/fpga/of-fpga-region.c | |||
@@ -437,9 +437,10 @@ eprobe_mgr_put: | |||
437 | static int of_fpga_region_remove(struct platform_device *pdev) | 437 | static int of_fpga_region_remove(struct platform_device *pdev) |
438 | { | 438 | { |
439 | struct fpga_region *region = platform_get_drvdata(pdev); | 439 | struct fpga_region *region = platform_get_drvdata(pdev); |
440 | struct fpga_manager *mgr = region->mgr; | ||
440 | 441 | ||
441 | fpga_region_unregister(region); | 442 | fpga_region_unregister(region); |
442 | fpga_mgr_put(region->mgr); | 443 | fpga_mgr_put(mgr); |
443 | 444 | ||
444 | return 0; | 445 | return 0; |
445 | } | 446 | } |