Merge "video: driver: check for regulator support before initializing"
Esse commit está contido em:

commit de
Gerrit - the friendly Code Review server

commit
bc62a68248
@@ -229,6 +229,11 @@ static inline bool is_mmrm_supported(struct msm_vidc_core *core)
|
||||
return !!core->platform->data.supports_mmrm;
|
||||
}
|
||||
|
||||
static inline bool is_regulator_supported(struct msm_vidc_core *core)
|
||||
{
|
||||
return !!core->platform->data.regulator_tbl_size;
|
||||
}
|
||||
|
||||
int msm_vidc_init_platform(struct platform_device *pdev);
|
||||
int msm_vidc_deinit_platform(struct platform_device *pdev);
|
||||
|
||||
|
@@ -234,6 +234,12 @@ static int __init_regulators(struct msm_vidc_core *core)
|
||||
}
|
||||
regulators = &core->resource->regulator_set;
|
||||
|
||||
/* skip init if regulators not supported */
|
||||
if (!is_regulator_supported(core)) {
|
||||
d_vpr_h("%s: regulators are not available in database\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
regulator_tbl = core->platform->data.regulator_tbl;
|
||||
regulator_count = core->platform->data.regulator_tbl_size;
|
||||
|
||||
|
Referência em uma nova issue
Block a user