[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191206184536.2507-7-linux.amoon@gmail.com>
Date: Fri, 6 Dec 2019 18:45:34 +0000
From: Anand Moon <linux.amoon@...il.com>
To: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Heiko Stuebner <heiko@...ech.de>,
Jagan Teki <jagan@...rulasolutions.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Robin Murphy <robin.murphy@....com>,
Daniel Schultz <d.schultz@...tec.de>
Cc: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [RFCv1 6/8] mfd: rk808: use common syscore for all PMCI for clean shutdown
Move the register_syscore_ops to common location for all PMIC.
Add missing unregister_syscore_ops in rk808_remove function.
Cc: Heiko Stuebner <heiko@...ech.de>
Signed-off-by: Anand Moon <linux.amoon@...il.com>
---
drivers/mfd/rk808.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 9a7be379946a..54f3999e4948 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -590,7 +590,6 @@ static int rk808_probe(struct i2c_client *client,
nr_pre_init_regs = ARRAY_SIZE(rk817_pre_init_reg);
cells = rk817s;
nr_cells = ARRAY_SIZE(rk817s);
- register_syscore_ops(&rk808_syscore_ops);
break;
default:
dev_err(&client->dev, "Unsupported RK8XX ID %lu\n",
@@ -644,6 +643,8 @@ static int rk808_probe(struct i2c_client *client,
if (!rk808_i2c_client)
rk808_i2c_client = client;
+ register_syscore_ops(&rk808_syscore_ops);
+
return 0;
err_irq:
@@ -657,6 +658,8 @@ static int rk808_remove(struct i2c_client *client)
regmap_del_irq_chip(client->irq, rk808->irq_data);
+ unregister_syscore_ops(&rk808_syscore_ops);
+
return 0;
}
--
2.24.0
Powered by blists - more mailing lists