# \[PATCH v4 19/24\] fpga: dfl-fme-region: add compat\_id support

- From: Wu Hao \<hidden\>
- Date: 2018-02-13 09:36:03 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2018/02/5193792
- Thread: https://ratatoskr.run/linux-fpga/2018/02/5193758/t.md

```text
This patch adds compat_id support, configure the compat_id value
of fpga_region, then userspace could read it from the common sysfs
interface compat_id of fpga_region.

Signed-off-by: Wu Hao <redacted>
---
 drivers/fpga/dfl-fme-region.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl-fme-region.c
index 1f5f33d..bcef98a 100644
--- a/drivers/fpga/dfl-fme-region.c
+++ b/drivers/fpga/dfl-fme-region.c
@@ -48,6 +48,7 @@ static int fme_region_probe(struct platform_device *pdev)
 	region->get_bridges = fme_region_get_bridges;
 	region->priv = pdata;
 	region->parent = dev;
+	region->compat_id = pdata->compat_id;
 	platform_set_drvdata(pdev, region);
 
 	ret = fpga_region_register(region);
-- 
2.7.4
```
