diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:07 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:09 +0300 |
commit | cb8bb9cedb6015eafd56ef9e9c5b2c216e8e7960 (patch) | |
tree | f4333cb97eaf8f656603dd99e39f0bafee9f4e34 /drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | |
parent | da06b46b720687117178d3ee85a601762f1c36b5 (diff) | |
download | linux-cb8bb9cedb6015eafd56ef9e9c5b2c216e8e7960.tar.xz |
drm/nouveau/tmr: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c index 37b9f47f663c..83ebf366a221 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c @@ -32,7 +32,7 @@ static int nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target) { struct nvkm_therm_priv *therm = (void *)fan->parent; - struct nvkm_timer *ptimer = nvkm_timer(therm); + struct nvkm_timer *tmr = nvkm_timer(therm); unsigned long flags; int ret = 0; int duty; @@ -94,7 +94,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target) else delay = bump_period; - ptimer->alarm(ptimer, delay * 1000 * 1000, &fan->alarm); + tmr->alarm(tmr, delay * 1000 * 1000, &fan->alarm); } return ret; @@ -125,7 +125,7 @@ int nvkm_therm_fan_sense(struct nvkm_therm *obj) { struct nvkm_therm_priv *therm = container_of(obj, typeof(*therm), base); - struct nvkm_timer *ptimer = nvkm_timer(therm); + struct nvkm_timer *tmr = nvkm_timer(therm); struct nvkm_gpio *gpio = nvkm_gpio(therm); u32 cycles, cur, prev; u64 start, end, tach; @@ -137,7 +137,7 @@ nvkm_therm_fan_sense(struct nvkm_therm *obj) * When the fan spins, it changes the value of GPIO FAN_SENSE. * We get 4 changes (0 -> 1 -> 0 -> 1) per complete rotation. */ - start = ptimer->read(ptimer); + start = tmr->read(tmr); prev = gpio->get(gpio, 0, therm->fan->tach.func, therm->fan->tach.line); cycles = 0; do { @@ -146,12 +146,12 @@ nvkm_therm_fan_sense(struct nvkm_therm *obj) cur = gpio->get(gpio, 0, therm->fan->tach.func, therm->fan->tach.line); if (prev != cur) { if (!start) - start = ptimer->read(ptimer); + start = tmr->read(tmr); cycles++; prev = cur; } - } while (cycles < 5 && ptimer->read(ptimer) - start < 250000000); - end = ptimer->read(ptimer); + } while (cycles < 5 && tmr->read(tmr) - start < 250000000); + end = tmr->read(tmr); if (cycles == 5) { tach = (u64)60000000000ULL; @@ -217,10 +217,10 @@ int nvkm_therm_fan_fini(struct nvkm_therm *obj, bool suspend) { struct nvkm_therm_priv *therm = container_of(obj, typeof(*therm), base); - struct nvkm_timer *ptimer = nvkm_timer(therm); + struct nvkm_timer *tmr = nvkm_timer(therm); if (suspend) - ptimer->alarm_cancel(ptimer, &therm->fan->alarm); + tmr->alarm_cancel(tmr, &therm->fan->alarm); return 0; } |