aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/avs/smartreflex.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index fccb62743d19..08a8a299f1fd 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -465,9 +465,9 @@ int sr_disable_errgen(struct omap_sr *sr)
465} 465}
466 466
467/** 467/**
468 * sr_configure_minmax() - Configures the smrtreflex to perform AVS using the 468 * sr_configure_minmax() - Configures the SmartReflex to perform AVS using the
469 * minmaxavg module. 469 * minmaxavg module.
470 * @voltdm: VDD pointer to which the SR module to be configured belongs to. 470 * @sr: SR module to be configured.
471 * 471 *
472 * This API is to be called from the smartreflex class driver to 472 * This API is to be called from the smartreflex class driver to
473 * configure the minmaxavg module inside the smartreflex module. 473 * configure the minmaxavg module inside the smartreflex module.
@@ -476,16 +476,16 @@ int sr_disable_errgen(struct omap_sr *sr)
476 * SR CLASS 2 can choose between ERROR module and MINMAXAVG 476 * SR CLASS 2 can choose between ERROR module and MINMAXAVG
477 * module. Returns 0 on success and error value in case of failure. 477 * module. Returns 0 on success and error value in case of failure.
478 */ 478 */
479int sr_configure_minmax(struct voltagedomain *voltdm) 479int sr_configure_minmax(struct omap_sr *sr)
480{ 480{
481 u32 sr_config, sr_avgwt; 481 u32 sr_config, sr_avgwt;
482 u32 senp_en = 0, senn_en = 0; 482 u32 senp_en = 0, senn_en = 0;
483 u8 senp_shift, senn_shift; 483 u8 senp_shift, senn_shift;
484 struct omap_sr *sr = _sr_lookup(voltdm);
485 484
486 if (IS_ERR(sr)) { 485 if (!sr) {
487 pr_warning("%s: omap_sr struct for voltdm not found\n", __func__); 486 pr_warn("%s: NULL omap_sr from %pF\n", __func__,
488 return PTR_ERR(sr); 487 (void *)_RET_IP_);
488 return -EINVAL;
489 } 489 }
490 490
491 if (!sr->clk_length) 491 if (!sr->clk_length)