[PATCH v6 3/3] platform/chrome: cros_ec_chardev: Secure cros_ec_device via revocable
From: Tzung-Bi Shih
Date: Thu Nov 06 2025 - 10:27:31 EST
Miscdevice now supports revocable fops replacement. Use it to secure
the cros_ec_device is available.
Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
---
v6:
- Modify the API usage accordingly.
v5: https://lore.kernel.org/chrome-platform/20251016054204.1523139-8-tzungbi@xxxxxxxxxx
- No primary changes but modify the API usage accordingly.
v4: https://lore.kernel.org/chrome-platform/20250923075302.591026-8-tzungbi@xxxxxxxxxx
drivers/platform/chrome/cros_ec_chardev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform/chrome/cros_ec_chardev.c
index c9d80ad5b57e..a7543e1bc07a 100644
--- a/drivers/platform/chrome/cros_ec_chardev.c
+++ b/drivers/platform/chrome/cros_ec_chardev.c
@@ -385,6 +385,7 @@ static int cros_ec_chardev_probe(struct platform_device *pdev)
misc->fops = &chardev_fops;
misc->name = ec_platform->ec_name;
misc->parent = pdev->dev.parent;
+ misc->revocable = true;
dev_set_drvdata(&pdev->dev, misc);
--
2.48.1