Miscdevice now supports revocable fops replacement.  Use it to secure
the cros_ec_device is available.

Signed-off-by: Tzung-Bi Shih <[email protected]>
---
v6:
- Modify the API usage accordingly.

v5: 
https://lore.kernel.org/chrome-platform/[email protected]
- No primary changes but modify the API usage accordingly.

v4: 
https://lore.kernel.org/chrome-platform/[email protected]

 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


Reply via email to