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

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

Merge "msm: kgsl: Do not populate sysfs with PPD on all targets"

parents ff997697 492fd726
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -382,13 +382,24 @@ static struct kobj_type ktype_ppd = {

static void ppd_sysfs_close(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (!ADRENO_FEATURE(adreno_dev, ADRENO_PPD))
		return;

	sysfs_remove_file(&device->ppd_kobj, &attr_enable.attr);
	kobject_put(&device->ppd_kobj);
}

static int ppd_sysfs_init(struct kgsl_device *device)
{
	int ret = kobject_init_and_add(&device->ppd_kobj, &ktype_ppd,
	int ret;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (!ADRENO_FEATURE(adreno_dev, ADRENO_PPD))
		return -ENODEV;

	ret = kobject_init_and_add(&device->ppd_kobj, &ktype_ppd,
		&device->dev->kobj, "ppd");

	if (ret == 0)