|
@@ -1010,7 +1010,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * ti_bandgap_set_continous_mode() - One time enabling of continuous mode
|
|
|
+ * ti_bandgap_set_continuous_mode() - One time enabling of continuous mode
|
|
|
* @bgp: pointer to struct ti_bandgap
|
|
|
*
|
|
|
* Call this function only if HAS(MODE_CONFIG) is set. As this driver may
|
|
@@ -1214,22 +1214,18 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
|
|
|
}
|
|
|
|
|
|
bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
|
|
|
- if (!bgp) {
|
|
|
- dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
|
|
|
+ if (!bgp)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
- }
|
|
|
|
|
|
of_id = of_match_device(of_ti_bandgap_match, &pdev->dev);
|
|
|
if (of_id)
|
|
|
bgp->conf = of_id->data;
|
|
|
|
|
|
/* register shadow for context save and restore */
|
|
|
- bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) *
|
|
|
- bgp->conf->sensor_count, GFP_KERNEL);
|
|
|
- if (!bgp->regval) {
|
|
|
- dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
|
|
|
+ bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count,
|
|
|
+ sizeof(*bgp->regval), GFP_KERNEL);
|
|
|
+ if (!bgp->regval)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
- }
|
|
|
|
|
|
i = 0;
|
|
|
do {
|