Skip to content

Commit

Permalink
drm/nouveau/therm: always initialize alarm_program_lock
Browse files Browse the repository at this point in the history
Fixes "BUG: spinlock bad magic" on module load for nva3+ cards.

Introduced in commit "drm/nouveau/therm: implement support for temperature
alarms".

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Feb 20, 2013
1 parent b795016 commit 3969f05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/core/subdev/therm/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ nouveau_therm_create_(struct nouveau_object *parent,

nouveau_alarm_init(&priv->alarm, nouveau_therm_alarm);
spin_lock_init(&priv->lock);
spin_lock_init(&priv->sensor.alarm_program_lock);

priv->base.fan_get = nouveau_therm_fan_user_get;
priv->base.fan_set = nouveau_therm_fan_user_set;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ nv50_therm_ctor(struct nouveau_object *parent,
priv->base.base.pwm_clock = nv50_fan_pwm_clock;
priv->base.base.temp_get = nv50_temp_get;
priv->base.sensor.program_alarms = nv50_therm_program_alarms;
spin_lock_init(&priv->base.sensor.alarm_program_lock);
nv_subdev(priv)->intr = nv50_therm_intr;

/* init the thresholds */
Expand Down

0 comments on commit 3969f05

Please sign in to comment.