From 23ab36fd8ad887fdea1a7fc964a175384a82100a Mon Sep 17 00:00:00 2001 From: Kazuki Hashimoto Date: Tue, 11 May 2021 22:05:16 +0530 Subject: [PATCH] wakeup_stats: Don't export device info to sysfs wakeup_source_device_create creates a symlink to the directory of the device associated with the wakelock. Not only is this unnecessary, this also results in selinux denials and the following errors in logcat if the directory isn't whitelisted in sepolicy: "Error opening kernel wakelock stats for: wakeup[n]: Permission denied" Stop creating the symlink to silence the errors as it's useless anyway. Signed-off-by: Kazuki Hashimoto Signed-off-by: K A R T H I K Signed-off-by: azrim --- drivers/base/power/wakeup_stats.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c index 5568e25d7c9c..26addabddc68 100644 --- a/drivers/base/power/wakeup_stats.c +++ b/drivers/base/power/wakeup_stats.c @@ -145,7 +145,6 @@ static struct device *wakeup_source_device_create(struct device *parent, device_initialize(dev); dev->devt = MKDEV(0, 0); dev->class = wakeup_class; - dev->parent = parent; dev->groups = wakeup_source_groups; dev->release = device_create_release; dev_set_drvdata(dev, ws);