Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f80a75dd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: base: cpu: Add a knob to suppress cpu uevents"

parents 3914f179 c483c471
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -439,6 +439,33 @@ static struct attribute_group sched_qhmp_cpu_attr_group = {
};

#endif	/* CONFIG_SCHED_QHMP */

static ssize_t uevent_suppress_store(struct device *dev,
				struct device_attribute *attr,
				const char *buf, size_t count)
{
	bool val;
	int ret;

	ret = strtobool(buf, &val);
	if (ret < 0)
		return ret;

	dev_set_uevent_suppress(dev, val);
	return count;
}

static DEVICE_ATTR_WO(uevent_suppress);

static struct attribute *uevent_suppress_cpu_attrs[] = {
	&dev_attr_uevent_suppress.attr,
	NULL
};

static struct attribute_group uevent_suppress_cpu_attr_group = {
	.attrs = uevent_suppress_cpu_attrs,
};

static const struct attribute_group *common_cpu_attr_groups[] = {
#ifdef CONFIG_KEXEC
	&crash_note_cpu_attr_group,
@@ -462,6 +489,7 @@ static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
#ifdef CONFIG_SCHED_QHMP
	&sched_qhmp_cpu_attr_group,
#endif
	&uevent_suppress_cpu_attr_group,
	NULL
};