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 2018-01-09 11:43:16 +08:00 committed by Tao Huang
parent 8c6943ea7c
commit 0e7d55e6f0

View File

@ -930,6 +930,7 @@ static int rk808_probe(struct i2c_client *client,
}
rk808->i2c = client;
rk808_i2c_client = client;
i2c_set_clientdata(client, rk808);
ret = mfd_add_devices(&client->dev, -1,
@ -943,7 +944,6 @@ static int rk808_probe(struct i2c_client *client,
pm_off = of_property_read_bool(np,
"rockchip,system-power-controller");
if (pm_off) {
rk808_i2c_client = client;
if (pm_shutdown_prepare_fn) {
pm_shutdown_prepare = pm_shutdown_prepare_fn;
pm_power_off_prepare = rk808_device_shutdown_prepare;