diff options
| author | David Collins <collinsd@codeaurora.org> | 2017-01-31 11:56:13 -0800 |
|---|---|---|
| committer | David Collins <collinsd@codeaurora.org> | 2017-02-03 11:46:59 -0800 |
| commit | 1abc78fdb5a66544b745f3beddec9c321c24dcf8 (patch) | |
| tree | e819bf3cc5c2d75203abfe9febada20e48ac09ea | |
| parent | 49bb1ec1f88c3c933a109a245871ba2b5eacc2a3 (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>
| -rw-r--r-- | drivers/power/qcom/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/power/qcom/apm.c | 8 |
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/power/qcom/Kconfig b/drivers/power/qcom/Kconfig index b7ca61d6c21d..efb9dd9628bb 100644 --- a/drivers/power/qcom/Kconfig +++ b/drivers/power/qcom/Kconfig @@ -23,12 +23,12 @@ config APSS_CORE_EA and temperature information to the scheduler. config MSM_APM - bool "Qualcomm Technologies Inc platform specific APM driver" - help - Platform specific driver to manage the power source of - memory arrays. Interfaces with regulator drivers to ensure - SRAM Vmin requirements are met across different performance - levels. + bool "Qualcomm Technologies, Inc. platform specific APM driver" + help + Platform specific driver to manage the power source of + memory arrays. Interfaces with regulator drivers to ensure + SRAM Vmin requirements are met across different performance + levels. if MSM_PM menuconfig MSM_IDLE_STATS 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); |
