mfd: rk808: initialize rk808_i2c_client by default

Even "rockchip,system-power-controller" is not found,
rk808_i2c_client is needed for suspend/resume and the
other.

Change-Id: I17ebb3a1d1e7ec8dc9f4a3ee2dbdcd9ae4c1648b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2017-12-25 14:53:06 +08:00 committed by Tao Huang
parent adb91abb82
commit db1243d054

View File

@ -831,6 +831,7 @@ static int rk808_probe(struct i2c_client *client,
}
rk808->i2c = client;
rk808_i2c_client = client;
i2c_set_clientdata(client, rk808);
rk808->regmap = devm_regmap_init_i2c(client, rk808->regmap_cfg);
@ -889,7 +890,6 @@ static int rk808_probe(struct i2c_client *client,
pm_off = of_property_read_bool(np,
"rockchip,system-power-controller");
if (pm_off && !pm_power_off) {
rk808_i2c_client = client;
pm_power_off = pm_pwroff_fn;
}