forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/mfd/arizona-core.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Arizona core driver
34 *
45 * Copyright 2012 Wolfson Microelectronics plc
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/clk.h>
....@@ -83,7 +80,7 @@
8380 {
8481 mutex_lock(&arizona->clk_lock);
8582
86
- BUG_ON(arizona->clk32k_ref <= 0);
83
+ WARN_ON(arizona->clk32k_ref <= 0);
8784
8885 arizona->clk32k_ref--;
8986
....@@ -817,11 +814,7 @@
817814 int ret, i;
818815
819816 /* Handle old non-standard DT binding */
820
- pdata->reset = devm_gpiod_get_from_of_node(arizona->dev,
821
- arizona->dev->of_node,
822
- "wlf,reset", 0,
823
- GPIOD_OUT_LOW,
824
- "arizona /RESET");
817
+ pdata->reset = devm_gpiod_get(arizona->dev, "wlf,reset", GPIOD_OUT_LOW);
825818 if (IS_ERR(pdata->reset)) {
826819 ret = PTR_ERR(pdata->reset);
827820
....@@ -990,7 +983,7 @@
990983
991984 int arizona_dev_init(struct arizona *arizona)
992985 {
993
- const char * const mclk_name[] = { "mclk1", "mclk2" };
986
+ static const char * const mclk_name[] = { "mclk1", "mclk2" };
994987 struct device *dev = arizona->dev;
995988 const char *type_name = NULL;
996989 unsigned int reg, val;