[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1492697401-11211-10-git-send-email-atull@kernel.org>
Date: Thu, 20 Apr 2017 09:09:54 -0500
From: Alan Tull <atull@...nel.org>
To: Moritz Fischer <moritz.fischer@...us.com>
Cc: Alan Tull <atull@...nel.org>, linux-kernel@...r.kernel.org,
linux-fpga@...r.kernel.org
Subject: [PATCH v2 09/16] fpga: region: fix slow warning with more than one overlay
Prevent applying more than one overlay to a region.
This fixes a slow warning that happens when more than
one overlay is applied and then removed.
Signed-off-by: Alan Tull <atull@...nel.org>
---
v2: split out from another patch
---
drivers/fpga/fpga-region.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
index c2730a8..d6f2313 100644
--- a/drivers/fpga/fpga-region.c
+++ b/drivers/fpga/fpga-region.c
@@ -355,6 +355,11 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,
const char *firmware_name;
int ret;
+ if (region->info) {
+ dev_err(dev, "Region already has overlay applied.\n");
+ return -EINVAL;
+ }
+
/*
* Reject overlay if child FPGA Regions added in the overlay have
* firmware-name property (would mean that an FPGA region that has
--
2.7.4
Powered by blists - more mailing lists