summaryrefslogtreecommitdiff
path: root/drivers/power/qcom/apm.c
diff options
context:
space:
mode:
authorDavid Collins <collinsd@codeaurora.org>2017-01-31 11:56:13 -0800
committerDavid Collins <collinsd@codeaurora.org>2017-02-03 11:46:59 -0800
commit1abc78fdb5a66544b745f3beddec9c321c24dcf8 (patch)
treee819bf3cc5c2d75203abfe9febada20e48ac09ea /drivers/power/qcom/apm.c
parent49bb1ec1f88c3c933a109a245871ba2b5eacc2a3 (diff)
power: qcom: apm: correct various coding style issues
Correct warnings flagged by checkpatch. In particular, modify the following: - Use octal file permissions instead of symbolic. - Add 'const' to type of struct of_device_id variable. - Remove unnecessary out-of-memory error message. - Update the the MSM_APM Kconfig entry. Change-Id: I57c6d499c90db62ca2733f302bd045b4d439905f Signed-off-by: David Collins <collinsd@codeaurora.org>
Diffstat (limited to 'drivers/power/qcom/apm.c')
-rw-r--r--drivers/power/qcom/apm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/power/qcom/apm.c b/drivers/power/qcom/apm.c
index c957025fd5b3..6181b08a41a5 100644
--- a/drivers/power/qcom/apm.c
+++ b/drivers/power/qcom/apm.c
@@ -898,7 +898,7 @@ static void apm_debugfs_init(struct msm_apm_ctrl_dev *ctrl_dev)
return;
}
- temp = debugfs_create_file("supply", S_IRUGO, ctrl_dev->debugfs,
+ temp = debugfs_create_file("supply", 0444, ctrl_dev->debugfs,
ctrl_dev, &apm_supply_fops);
if (IS_ERR_OR_NULL(temp)) {
pr_err("supply mode creation failed\n");
@@ -932,7 +932,7 @@ static void apm_debugfs_base_remove(void)
#endif
-static struct of_device_id msm_apm_match_table[] = {
+static const struct of_device_id msm_apm_match_table[] = {
{
.compatible = "qcom,msm-apm",
.data = (void *)(uintptr_t)MSM8996_ID,
@@ -967,10 +967,8 @@ static int msm_apm_probe(struct platform_device *pdev)
return -ENODEV;
ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
- if (!ctrl) {
- dev_err(dev, "MSM APM controller memory allocation failed\n");
+ if (!ctrl)
return -ENOMEM;
- }
INIT_LIST_HEAD(&ctrl->list);
spin_lock_init(&ctrl->lock);