drm/amdgpu/i2c: add const where appropriate

Submitted by Grazvydas Ignotas on Sept. 25, 2016, 8:34 p.m.

Details

Message ID 1474835690-2621-5-git-send-email-notasas@gmail.com
State New
Headers show
Series "drm/amdgpu/i2c: add const where appropriate" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Grazvydas Ignotas Sept. 25, 2016, 8:34 p.m.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 14 +++++++-------
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index c93a92a..34bab61 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -158,8 +158,8 @@  static const struct i2c_algorithm amdgpu_atombios_i2c_algo = {
 };
 
 struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
-					    struct amdgpu_i2c_bus_rec *rec,
-					    const char *name)
+					  const struct amdgpu_i2c_bus_rec *rec,
+					  const char *name)
 {
 	struct amdgpu_i2c_chan *i2c;
 	int ret;
@@ -249,8 +249,8 @@  void amdgpu_i2c_fini(struct amdgpu_device *adev)
 
 /* Add additional buses */
 void amdgpu_i2c_add(struct amdgpu_device *adev,
-		     struct amdgpu_i2c_bus_rec *rec,
-		     const char *name)
+		    const struct amdgpu_i2c_bus_rec *rec,
+		    const char *name)
 {
 	struct drm_device *dev = adev->ddev;
 	int i;
@@ -266,7 +266,7 @@  void amdgpu_i2c_add(struct amdgpu_device *adev,
 /* looks up bus based on id */
 struct amdgpu_i2c_chan *
 amdgpu_i2c_lookup(struct amdgpu_device *adev,
-		   struct amdgpu_i2c_bus_rec *i2c_bus)
+		  const struct amdgpu_i2c_bus_rec *i2c_bus)
 {
 	int i;
 
@@ -336,7 +336,7 @@  static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus,
 
 /* ddc router switching */
 void
-amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector)
+amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *amdgpu_connector)
 {
 	u8 val;
 
@@ -365,7 +365,7 @@  amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector)
 
 /* clock/data router switching */
 void
-amdgpu_i2c_router_select_cd_port(struct amdgpu_connector *amdgpu_connector)
+amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *amdgpu_connector)
 {
 	u8 val;
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
index d81e19b..63c2ff7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
@@ -25,20 +25,20 @@ 
 #define __AMDGPU_I2C_H__
 
 struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
-					    struct amdgpu_i2c_bus_rec *rec,
-					    const char *name);
+					  const struct amdgpu_i2c_bus_rec *rec,
+					  const char *name);
 void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c);
 void amdgpu_i2c_init(struct amdgpu_device *adev);
 void amdgpu_i2c_fini(struct amdgpu_device *adev);
 void amdgpu_i2c_add(struct amdgpu_device *adev,
-		     struct amdgpu_i2c_bus_rec *rec,
-		     const char *name);
+		    const struct amdgpu_i2c_bus_rec *rec,
+		    const char *name);
 struct amdgpu_i2c_chan *
 amdgpu_i2c_lookup(struct amdgpu_device *adev,
-		   struct amdgpu_i2c_bus_rec *i2c_bus);
+		  const struct amdgpu_i2c_bus_rec *i2c_bus);
 void
-amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector);
+amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *connector);
 void
-amdgpu_i2c_router_select_cd_port(struct amdgpu_connector *amdgpu_connector);
+amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *connector);
 
 #endif

Comments

On Sun, Sep 25, 2016 at 4:34 PM, Grazvydas Ignotas <notasas@gmail.com> wrote:
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---

Applied this whole set of patches.  Thanks!

Alex

>  drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 14 +++++++-------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 14 +++++++-------
>  2 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> index c93a92a..34bab61 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> @@ -158,8 +158,8 @@ static const struct i2c_algorithm amdgpu_atombios_i2c_algo = {
>  };
>
>  struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
> -                                           struct amdgpu_i2c_bus_rec *rec,
> -                                           const char *name)
> +                                         const struct amdgpu_i2c_bus_rec *rec,
> +                                         const char *name)
>  {
>         struct amdgpu_i2c_chan *i2c;
>         int ret;
> @@ -249,8 +249,8 @@ void amdgpu_i2c_fini(struct amdgpu_device *adev)
>
>  /* Add additional buses */
>  void amdgpu_i2c_add(struct amdgpu_device *adev,
> -                    struct amdgpu_i2c_bus_rec *rec,
> -                    const char *name)
> +                   const struct amdgpu_i2c_bus_rec *rec,
> +                   const char *name)
>  {
>         struct drm_device *dev = adev->ddev;
>         int i;
> @@ -266,7 +266,7 @@ void amdgpu_i2c_add(struct amdgpu_device *adev,
>  /* looks up bus based on id */
>  struct amdgpu_i2c_chan *
>  amdgpu_i2c_lookup(struct amdgpu_device *adev,
> -                  struct amdgpu_i2c_bus_rec *i2c_bus)
> +                 const struct amdgpu_i2c_bus_rec *i2c_bus)
>  {
>         int i;
>
> @@ -336,7 +336,7 @@ static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus,
>
>  /* ddc router switching */
>  void
> -amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector)
> +amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *amdgpu_connector)
>  {
>         u8 val;
>
> @@ -365,7 +365,7 @@ amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector)
>
>  /* clock/data router switching */
>  void
> -amdgpu_i2c_router_select_cd_port(struct amdgpu_connector *amdgpu_connector)
> +amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *amdgpu_connector)
>  {
>         u8 val;
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> index d81e19b..63c2ff7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> @@ -25,20 +25,20 @@
>  #define __AMDGPU_I2C_H__
>
>  struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
> -                                           struct amdgpu_i2c_bus_rec *rec,
> -                                           const char *name);
> +                                         const struct amdgpu_i2c_bus_rec *rec,
> +                                         const char *name);
>  void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c);
>  void amdgpu_i2c_init(struct amdgpu_device *adev);
>  void amdgpu_i2c_fini(struct amdgpu_device *adev);
>  void amdgpu_i2c_add(struct amdgpu_device *adev,
> -                    struct amdgpu_i2c_bus_rec *rec,
> -                    const char *name);
> +                   const struct amdgpu_i2c_bus_rec *rec,
> +                   const char *name);
>  struct amdgpu_i2c_chan *
>  amdgpu_i2c_lookup(struct amdgpu_device *adev,
> -                  struct amdgpu_i2c_bus_rec *i2c_bus);
> +                 const struct amdgpu_i2c_bus_rec *i2c_bus);
>  void
> -amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector);
> +amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *connector);
>  void
> -amdgpu_i2c_router_select_cd_port(struct amdgpu_connector *amdgpu_connector);
> +amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *connector);
>
>  #endif
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx