zdev: introduce dev_site_configured macro

Introduce dev_site_configured macro,which can be used to find the
availability of site configurations for the device during udev rule
creation.

Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Vineeth Vijayan
2023-09-18 17:41:30 +02:00
committed by Jan Höppner
parent 73c82441e7
commit 5637799c92
2 changed files with 8 additions and 10 deletions

View File

@@ -25,4 +25,7 @@
#define NUM_USER_SITES (NUM_SITES - 1)
#define SITE_FALLBACK NUM_USER_SITES
/* Helper to find the availability of site-configuration */
#define dev_site_configured(dev, x) (dev->site_specific[(x)].exists && \
!dev->site_specific[(x)].deconfigured)
#endif /* SITE_H */