aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-07-19 09:28:41 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-07-25 21:42:25 -0400
commit6d6a413aa23c8bc7a5787596e06f3d6d8d4f11c7 (patch)
tree1b439ae3fea7ff9a0e8ec35faf34fc85abd60948 /drivers/gpu/drm
parent67eda20e6b7a757ed45f6b5a8a4d30c2a0d47c7a (diff)
drm/i2c/ch7006: Don't assume that the specified config points to static memory.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i2c/ch7006_drv.c4
-rw-r--r--drivers/gpu/drm/i2c/ch7006_priv.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index 3e2c9da6c81e..833b35f44a77 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -33,7 +33,7 @@ static void ch7006_encoder_set_config(struct drm_encoder *encoder,
33{ 33{
34 struct ch7006_priv *priv = to_ch7006_priv(encoder); 34 struct ch7006_priv *priv = to_ch7006_priv(encoder);
35 35
36 priv->params = params; 36 priv->params = *(struct ch7006_encoder_params *)params;
37} 37}
38 38
39static void ch7006_encoder_destroy(struct drm_encoder *encoder) 39static void ch7006_encoder_destroy(struct drm_encoder *encoder)
@@ -114,7 +114,7 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder,
114{ 114{
115 struct i2c_client *client = drm_i2c_encoder_get_client(encoder); 115 struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
116 struct ch7006_priv *priv = to_ch7006_priv(encoder); 116 struct ch7006_priv *priv = to_ch7006_priv(encoder);
117 struct ch7006_encoder_params *params = priv->params; 117 struct ch7006_encoder_params *params = &priv->params;
118 struct ch7006_state *state = &priv->state; 118 struct ch7006_state *state = &priv->state;
119 uint8_t *regs = state->regs; 119 uint8_t *regs = state->regs;
120 struct ch7006_mode *mode = priv->mode; 120 struct ch7006_mode *mode = priv->mode;
diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h
index b06d3d93d8ac..1c6d2e3bd96f 100644
--- a/drivers/gpu/drm/i2c/ch7006_priv.h
+++ b/drivers/gpu/drm/i2c/ch7006_priv.h
@@ -77,7 +77,7 @@ struct ch7006_state {
77}; 77};
78 78
79struct ch7006_priv { 79struct ch7006_priv {
80 struct ch7006_encoder_params *params; 80 struct ch7006_encoder_params params;
81 struct ch7006_mode *mode; 81 struct ch7006_mode *mode;
82 82
83 struct ch7006_state state; 83 struct ch7006_state state;