Commit 6d6a413a authored by Francisco Jerez's avatar Francisco Jerez Committed by Ben Skeggs

drm/i2c/ch7006: Don't assume that the specified config points to static memory.

Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 67eda20e
...@@ -33,7 +33,7 @@ static void ch7006_encoder_set_config(struct drm_encoder *encoder, ...@@ -33,7 +33,7 @@ static void ch7006_encoder_set_config(struct drm_encoder *encoder,
{ {
struct ch7006_priv *priv = to_ch7006_priv(encoder); struct ch7006_priv *priv = to_ch7006_priv(encoder);
priv->params = params; priv->params = *(struct ch7006_encoder_params *)params;
} }
static void ch7006_encoder_destroy(struct drm_encoder *encoder) static void ch7006_encoder_destroy(struct drm_encoder *encoder)
...@@ -114,7 +114,7 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder, ...@@ -114,7 +114,7 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder,
{ {
struct i2c_client *client = drm_i2c_encoder_get_client(encoder); struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
struct ch7006_priv *priv = to_ch7006_priv(encoder); struct ch7006_priv *priv = to_ch7006_priv(encoder);
struct ch7006_encoder_params *params = priv->params; struct ch7006_encoder_params *params = &priv->params;
struct ch7006_state *state = &priv->state; struct ch7006_state *state = &priv->state;
uint8_t *regs = state->regs; uint8_t *regs = state->regs;
struct ch7006_mode *mode = priv->mode; struct ch7006_mode *mode = priv->mode;
......
...@@ -77,7 +77,7 @@ struct ch7006_state { ...@@ -77,7 +77,7 @@ struct ch7006_state {
}; };
struct ch7006_priv { struct ch7006_priv {
struct ch7006_encoder_params *params; struct ch7006_encoder_params params;
struct ch7006_mode *mode; struct ch7006_mode *mode;
struct ch7006_state state; struct ch7006_state state;
......
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