summaryrefslogtreecommitdiff
path: root/hw/gpio/zaurus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/gpio/zaurus.c')
-rw-r--r--hw/gpio/zaurus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index 94083424f8..24a77272d7 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
@@ -65,7 +65,7 @@ static inline void scoop_gpio_handler_update(ScoopInfo *s) {
level = s->gpio_level & s->gpio_dir;
for (diff = s->prev_level ^ level; diff; diff ^= 1 << bit) {
- bit = ffs(diff) - 1;
+ bit = ctz32(diff);
qemu_set_irq(s->handler[bit], (level >> bit) & 1);
}