ipa: ipu3: agc: Use existing local short-hand variable in configure()

The configure() function has a local configuration variable referencing
context.configuration for the purpose of shortening lines. Use it
instead of context.configuration in the remaining locations, and
constify it while at it as the configuration isn't meant to be modified.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 70cff3f..7d4b350 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -86,17 +86,17 @@
 int Agc::configure(IPAContext &context,
 		   [[maybe_unused]] const IPAConfigInfo &configInfo)
 {
-	IPASessionConfiguration &configuration = context.configuration;
+	const IPASessionConfiguration &configuration = context.configuration;
 	IPAFrameContext &frameContext = context.frameContext;
 
 	stride_ = configuration.grid.stride;
 
-	minShutterSpeed_ = context.configuration.agc.minShutterSpeed;
-	maxShutterSpeed_ = std::min(context.configuration.agc.maxShutterSpeed,
+	minShutterSpeed_ = configuration.agc.minShutterSpeed;
+	maxShutterSpeed_ = std::min(configuration.agc.maxShutterSpeed,
 				    kMaxShutterSpeed);
 
-	minAnalogueGain_ = std::max(context.configuration.agc.minAnalogueGain, kMinAnalogueGain);
-	maxAnalogueGain_ = std::min(context.configuration.agc.maxAnalogueGain, kMaxAnalogueGain);
+	minAnalogueGain_ = std::max(configuration.agc.minAnalogueGain, kMinAnalogueGain);
+	maxAnalogueGain_ = std::min(configuration.agc.maxAnalogueGain, kMaxAnalogueGain);
 
 	/* Configure the default exposure and gain. */
 	frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain);