aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-30 14:41:18 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-30 14:41:18 +0000
commit4ed3c0e713adac46dcca8a9ee668221399b7b659 (patch)
tree06929dc26671f0710b964d5bb0a7634f12528a36 /sys/mips
parent7154bf4a413eca71cffdb37361ad19960501a2fa (diff)
downloadsrc-4ed3c0e713adac46dcca8a9ee668221399b7b659.tar.gz
src-4ed3c0e713adac46dcca8a9ee668221399b7b659.zip
sys: Make use of our rounddown() macro when sys/param.h is available.
No functional change.
Notes
Notes: svn path=/head/; revision=298848
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/atheros/ar934x_chip.c2
-rw-r--r--sys/mips/atheros/qca953x_chip.c2
-rw-r--r--sys/mips/atheros/qca955x_chip.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/mips/atheros/ar934x_chip.c b/sys/mips/atheros/ar934x_chip.c
index b5b804f000d7..f59d4aaa5285 100644
--- a/sys/mips/atheros/ar934x_chip.c
+++ b/sys/mips/atheros/ar934x_chip.c
@@ -437,7 +437,7 @@ ar934x_chip_gpio_output_configure(int gpio, uint8_t func)
if (gpio > AR934X_GPIO_COUNT)
return;
- reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
+ reg = AR934X_GPIO_REG_OUT_FUNC0 + rounddown(gpio, 4);
s = 8 * (gpio % 4);
/* read-modify-write */
diff --git a/sys/mips/atheros/qca953x_chip.c b/sys/mips/atheros/qca953x_chip.c
index a262a9f8b078..88127b4ac691 100644
--- a/sys/mips/atheros/qca953x_chip.c
+++ b/sys/mips/atheros/qca953x_chip.c
@@ -360,7 +360,7 @@ qca953x_chip_gpio_output_configure(int gpio, uint8_t func)
if (gpio > QCA953X_GPIO_COUNT)
return;
- reg = QCA953X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
+ reg = QCA953X_GPIO_REG_OUT_FUNC0 + rounddown(gpio, 4);
s = 8 * (gpio % 4);
/* read-modify-write */
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 */