Commit 44f9d7b3 authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Alex Deucher

drm/amdgpu/i2c: add const where appropriate

Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 54ddf3a6
...@@ -158,7 +158,7 @@ static const struct i2c_algorithm amdgpu_atombios_i2c_algo = { ...@@ -158,7 +158,7 @@ static const struct i2c_algorithm amdgpu_atombios_i2c_algo = {
}; };
struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev, struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
struct amdgpu_i2c_bus_rec *rec, const struct amdgpu_i2c_bus_rec *rec,
const char *name) const char *name)
{ {
struct amdgpu_i2c_chan *i2c; struct amdgpu_i2c_chan *i2c;
...@@ -249,7 +249,7 @@ void amdgpu_i2c_fini(struct amdgpu_device *adev) ...@@ -249,7 +249,7 @@ void amdgpu_i2c_fini(struct amdgpu_device *adev)
/* Add additional buses */ /* Add additional buses */
void amdgpu_i2c_add(struct amdgpu_device *adev, void amdgpu_i2c_add(struct amdgpu_device *adev,
struct amdgpu_i2c_bus_rec *rec, const struct amdgpu_i2c_bus_rec *rec,
const char *name) const char *name)
{ {
struct drm_device *dev = adev->ddev; struct drm_device *dev = adev->ddev;
...@@ -266,7 +266,7 @@ void amdgpu_i2c_add(struct amdgpu_device *adev, ...@@ -266,7 +266,7 @@ void amdgpu_i2c_add(struct amdgpu_device *adev,
/* looks up bus based on id */ /* looks up bus based on id */
struct amdgpu_i2c_chan * struct amdgpu_i2c_chan *
amdgpu_i2c_lookup(struct amdgpu_device *adev, amdgpu_i2c_lookup(struct amdgpu_device *adev,
struct amdgpu_i2c_bus_rec *i2c_bus) const struct amdgpu_i2c_bus_rec *i2c_bus)
{ {
int i; int i;
...@@ -336,7 +336,7 @@ static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus, ...@@ -336,7 +336,7 @@ static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus,
/* ddc router switching */ /* ddc router switching */
void 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; u8 val;
...@@ -365,7 +365,7 @@ amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector) ...@@ -365,7 +365,7 @@ amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector)
/* clock/data router switching */ /* clock/data router switching */
void 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; u8 val;
......
...@@ -25,20 +25,20 @@ ...@@ -25,20 +25,20 @@
#define __AMDGPU_I2C_H__ #define __AMDGPU_I2C_H__
struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev, struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
struct amdgpu_i2c_bus_rec *rec, const struct amdgpu_i2c_bus_rec *rec,
const char *name); const char *name);
void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c); void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c);
void amdgpu_i2c_init(struct amdgpu_device *adev); void amdgpu_i2c_init(struct amdgpu_device *adev);
void amdgpu_i2c_fini(struct amdgpu_device *adev); void amdgpu_i2c_fini(struct amdgpu_device *adev);
void amdgpu_i2c_add(struct amdgpu_device *adev, void amdgpu_i2c_add(struct amdgpu_device *adev,
struct amdgpu_i2c_bus_rec *rec, const struct amdgpu_i2c_bus_rec *rec,
const char *name); const char *name);
struct amdgpu_i2c_chan * struct amdgpu_i2c_chan *
amdgpu_i2c_lookup(struct amdgpu_device *adev, amdgpu_i2c_lookup(struct amdgpu_device *adev,
struct amdgpu_i2c_bus_rec *i2c_bus); const struct amdgpu_i2c_bus_rec *i2c_bus);
void void
amdgpu_i2c_router_select_ddc_port(struct amdgpu_connector *amdgpu_connector); amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *connector);
void void
amdgpu_i2c_router_select_cd_port(struct amdgpu_connector *amdgpu_connector); amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *connector);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment