mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
PM / devfreq: rockchip_dmc: Fix support for optional regulators
When not using the "_optional" function, a dummy regulator may be returned and the driver fails to set voltage. Change-Id: Ib636572362ece234d6b5694c8832ec01daa274e1 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -1533,7 +1533,7 @@ static int rockchip_dmcfreq_probe(struct platform_device *pdev)
|
||||
mutex_init(&data->lock);
|
||||
INIT_LIST_HEAD(&data->video_info_list);
|
||||
|
||||
data->vdd_center = devm_regulator_get(dev, "center");
|
||||
data->vdd_center = devm_regulator_get_optional(dev, "center");
|
||||
if (IS_ERR(data->vdd_center)) {
|
||||
dev_err(dev, "Cannot get the regulator \"center\"\n");
|
||||
return PTR_ERR(data->vdd_center);
|
||||
|
||||
Reference in New Issue
Block a user