[PATCH 1/2] schemas: i2c: Avoid extra characters in i2c nodename pattern

Herve Codina <[email protected]>
Newsgroups org.kernel.vger.devicetree-spec,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Current nodename pattern doesn't limit the end of name for an i2c node.
It can match 'i2c@10-foo'.

In order to avoid matching to an incorrect name, avoid any extra
characters in nodename pattern.

Signed-off-by: Herve Codina <[email protected]>
---
 dtschema/schemas/i2c/i2c-controller.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dtschema/schemas/i2c/i2c-controller.yaml b/dtschema/schemas/i2c/i2c-controller.yaml
index 487e669..018d266 100644
--- a/dtschema/schemas/i2c/i2c-controller.yaml
+++ b/dtschema/schemas/i2c/i2c-controller.yaml
@@ -14,7 +14,7 @@ maintainers:
 
 properties:
   $nodename:
-    pattern: "^i2c(@.*)?"
+    pattern: "^i2c(@.*)?$"
 
   i2c-bus:
     type: object
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.