aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/atheros/qca955x_chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips/atheros/qca955x_chip.c')
-rw-r--r--sys/mips/atheros/qca955x_chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/mips/atheros/qca955x_chip.c b/sys/mips/atheros/qca955x_chip.c
index b4d54fa87334..d963cc6f2b68 100644
--- a/sys/mips/atheros/qca955x_chip.c
+++ b/sys/mips/atheros/qca955x_chip.c
@@ -369,7 +369,7 @@ qca955x_chip_gpio_output_configure(int gpio, uint8_t func)
if (gpio > QCA955X_GPIO_COUNT)
return;
- reg = QCA955X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
+ reg = QCA955X_GPIO_REG_OUT_FUNC0 + rounddown(gpio, 4);
s = 8 * (gpio % 4);
/* read-modify-write */