Miscdevice now supports revocable fops replacement. Use it to secure the cros_ec_device is available.
Signed-off-by: Tzung-Bi Shih tzungbi@kernel.org --- v6: - Modify the API usage accordingly.
v5: https://lore.kernel.org/chrome-platform/20251016054204.1523139-8-tzungbi@ker... - No primary changes but modify the API usage accordingly.
v4: https://lore.kernel.org/chrome-platform/20250923075302.591026-8-tzungbi@kern...
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);