Skip to content

Commit

Permalink
Merge branches 'pm-qos' and 'pm-devfreq'
Browse files Browse the repository at this point in the history
* pm-qos:
  PM / QoS: return -EINVAL for bogus strings

* pm-devfreq:
  PM / devfreq: constify attribute_group structures.
  PM / devfreq: tegra: fix error return code in tegra_devfreq_probe()
  PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe()
  • Loading branch information
Rafael J. Wysocki committed Jul 14, 2017
3 parents a252c25 + 2ca3033 + 20dd95e commit 6df609b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions drivers/base/power/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ static ssize_t pm_qos_latency_tolerance_store(struct device *dev,
value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
else if (!strcmp(buf, "any") || !strcmp(buf, "any\n"))
value = PM_QOS_LATENCY_ANY;
else
return -EINVAL;
}
ret = dev_pm_qos_update_user_latency_tolerance(dev, value);
return ret < 0 ? ret : n;
Expand Down
2 changes: 1 addition & 1 deletion drivers/devfreq/governor_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static struct attribute *dev_entries[] = {
&dev_attr_set_freq.attr,
NULL,
};
static struct attribute_group dev_attr_group = {
static const struct attribute_group dev_attr_group = {
.name = "userspace",
.attrs = dev_entries,
};
Expand Down
5 changes: 3 additions & 2 deletions drivers/devfreq/rk3399_dmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "Cannot get the dmc interrupt resource\n");
return -EINVAL;
dev_err(&pdev->dev,
"Cannot get the dmc interrupt resource: %d\n", irq);
return irq;
}
data = devm_kzalloc(dev, sizeof(struct rk3399_dmcfreq), GFP_KERNEL);
if (!data)
Expand Down
6 changes: 3 additions & 3 deletions drivers/devfreq/tegra-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
}

irq = platform_get_irq(pdev, 0);
if (irq <= 0) {
dev_err(&pdev->dev, "Failed to get IRQ\n");
return -ENODEV;
if (irq < 0) {
dev_err(&pdev->dev, "Failed to get IRQ: %d\n", irq);
return irq;
}

platform_set_drvdata(pdev, tegra);
Expand Down

0 comments on commit 6df609b

Please sign in to comment.