[PATCH 5/5] drm/amdgpu: Remove unused amdgpu_i2c functions

Alex Deucher alexdeucher at gmail.com
Tue Sep 24 17:05:04 UTC 2024


Applied the series.  Thanks!

Alex

On Sun, Sep 22, 2024 at 9:43 PM <linux at treblig.org> wrote:
>
> From: "Dr. David Alan Gilbert" <linux at treblig.org>
>
> amdgpu_i2c_add and amdgpu_i2c_init were added in 2015's commit
> d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
> but never used.
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux at treblig.org>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 25 -------------------------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h |  4 ----
>  2 files changed, 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> index 00d6211e0fbf..f0765ccde668 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
> @@ -225,15 +225,6 @@ void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c)
>         kfree(i2c);
>  }
>
> -/* Add the default buses */
> -void amdgpu_i2c_init(struct amdgpu_device *adev)
> -{
> -       if (amdgpu_hw_i2c)
> -               DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n");
> -
> -       amdgpu_atombios_i2c_init(adev);
> -}
> -
>  /* remove all the buses */
>  void amdgpu_i2c_fini(struct amdgpu_device *adev)
>  {
> @@ -247,22 +238,6 @@ void amdgpu_i2c_fini(struct amdgpu_device *adev)
>         }
>  }
>
> -/* Add additional buses */
> -void amdgpu_i2c_add(struct amdgpu_device *adev,
> -                   const struct amdgpu_i2c_bus_rec *rec,
> -                   const char *name)
> -{
> -       struct drm_device *dev = adev_to_drm(adev);
> -       int i;
> -
> -       for (i = 0; i < AMDGPU_MAX_I2C_BUS; i++) {
> -               if (!adev->i2c_bus[i]) {
> -                       adev->i2c_bus[i] = amdgpu_i2c_create(dev, rec, name);
> -                       return;
> -               }
> -       }
> -}
> -
>  /* looks up bus based on id */
>  struct amdgpu_i2c_chan *
>  amdgpu_i2c_lookup(struct amdgpu_device *adev,
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> index 63c2ff7499e1..21e3d1dad0a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
> @@ -28,11 +28,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
>                                           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,
> -                   const struct amdgpu_i2c_bus_rec *rec,
> -                   const char *name);
>  struct amdgpu_i2c_chan *
>  amdgpu_i2c_lookup(struct amdgpu_device *adev,
>                   const struct amdgpu_i2c_bus_rec *i2c_bus);
> --
> 2.46.1
>


More information about the amd-gfx mailing list