diff mbox series

[12/12] drm/i915/sdvo: Constify mapping structs

Message ID 20230829113920.13713-13-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Populate connector->ddc always | expand

Commit Message

Ville Syrjälä Aug. 29, 2023, 11:39 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We aren't intending to mutate the SDVO device mapping structs,
so make them const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jani Nikula Aug. 30, 2023, 12:09 p.m. UTC | #1
On Tue, 29 Aug 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We aren't intending to mutate the SDVO device mapping structs,
> so make them const.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index b988e05274c1..0bd815bf2e69 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -2579,7 +2579,7 @@ intel_sdvo_select_ddc_bus(struct intel_sdvo *sdvo,
>  			  struct intel_sdvo_connector *connector)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
> -	struct sdvo_device_mapping *mapping;
> +	const struct sdvo_device_mapping *mapping;
>  	int ddc_bus;
>  
>  	if (sdvo->base.port == PORT_B)
> @@ -2602,7 +2602,7 @@ static void
>  intel_sdvo_select_i2c_bus(struct intel_sdvo *sdvo)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
> -	struct sdvo_device_mapping *mapping;
> +	const struct sdvo_device_mapping *mapping;
>  	u8 pin;
>  
>  	if (sdvo->base.port == PORT_B)
> @@ -2647,7 +2647,7 @@ static u8
>  intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
> -	struct sdvo_device_mapping *my_mapping, *other_mapping;
> +	const struct sdvo_device_mapping *my_mapping, *other_mapping;
>  
>  	if (sdvo->base.port == PORT_B) {
>  		my_mapping = &dev_priv->display.vbt.sdvo_mappings[0];
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index b988e05274c1..0bd815bf2e69 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -2579,7 +2579,7 @@  intel_sdvo_select_ddc_bus(struct intel_sdvo *sdvo,
 			  struct intel_sdvo_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
-	struct sdvo_device_mapping *mapping;
+	const struct sdvo_device_mapping *mapping;
 	int ddc_bus;
 
 	if (sdvo->base.port == PORT_B)
@@ -2602,7 +2602,7 @@  static void
 intel_sdvo_select_i2c_bus(struct intel_sdvo *sdvo)
 {
 	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
-	struct sdvo_device_mapping *mapping;
+	const struct sdvo_device_mapping *mapping;
 	u8 pin;
 
 	if (sdvo->base.port == PORT_B)
@@ -2647,7 +2647,7 @@  static u8
 intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
 {
 	struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
-	struct sdvo_device_mapping *my_mapping, *other_mapping;
+	const struct sdvo_device_mapping *my_mapping, *other_mapping;
 
 	if (sdvo->base.port == PORT_B) {
 		my_mapping = &dev_priv->display.vbt.sdvo_mappings[0];