Skip to content

Commit

Permalink
drm/i2c/ch7006: Don't assume that the specified config points to stat…
Browse files Browse the repository at this point in the history
…ic memory.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Francisco Jerez authored and Ben Skeggs committed Jul 26, 2010
1 parent 67eda20 commit 6d6a413
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i2c/ch7006_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static void ch7006_encoder_set_config(struct drm_encoder *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)
Expand Down Expand Up @@ -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 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;
uint8_t *regs = state->regs;
struct ch7006_mode *mode = priv->mode;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i2c/ch7006_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct ch7006_state {
};

struct ch7006_priv {
struct ch7006_encoder_params *params;
struct ch7006_encoder_params params;
struct ch7006_mode *mode;

struct ch7006_state state;
Expand Down

0 comments on commit 6d6a413

Please sign in to comment.