summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv10_gpio.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-09-13 05:32:43 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-12-21 19:01:12 +1000
commit85a2a365216e8e4eccf826e7dcc06c6298ab5fc1 (patch)
treeb79dd73f4e5197d4fd679b89e63152a578416d34 /drivers/gpu/drm/nouveau/nv10_gpio.c
parent3f8e11e4b606a050007cd1020d59e7b74c68d088 (diff)
downloadlinux-85a2a365216e8e4eccf826e7dcc06c6298ab5fc1.tar.bz2
drm/nouveau/gpio: remove invert flag, use state[] everywhere
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv10_gpio.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv10_gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv10_gpio.c b/drivers/gpu/drm/nouveau/nv10_gpio.c
index 007fc29e2f86..748c9f739116 100644
--- a/drivers/gpu/drm/nouveau/nv10_gpio.c
+++ b/drivers/gpu/drm/nouveau/nv10_gpio.c
@@ -68,7 +68,7 @@ nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag)
value = NVReadCRTC(dev, 0, reg) >> shift;
- return (ent->invert ? 1 : 0) ^ (value & 1);
+ return (value & 1) == ent->state[1];
}
int
@@ -83,7 +83,7 @@ nv10_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state)
if (!get_gpio_location(ent, &reg, &shift, &mask))
return -ENODEV;
- value = ((ent->invert ? 1 : 0) ^ (state ? 1 : 0)) << shift;
+ value = ent->state[state & 1] << shift;
mask = ~(mask << shift);
NVWriteCRTC(dev, 0, reg, value | (NVReadCRTC(dev, 0, reg) & mask));