summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-30 14:41:18 +0000
committerpfg <pfg@FreeBSD.org>2016-04-30 14:41:18 +0000
commite72339bbf0cf32cc88d5e54df91debe618e92ada (patch)
tree06929dc26671f0710b964d5bb0a7634f12528a36 /sys/mips
parent20431f1fdeea72f57a3a56126ba1e194a9b8d076 (diff)
downloadFreeBSD-src-e72339bbf0cf32cc88d5e54df91debe618e92ada.zip
FreeBSD-src-e72339bbf0cf32cc88d5e54df91debe618e92ada.tar.gz
sys: Make use of our rounddown() macro when sys/param.h is available.
No functional change.
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 b5b804f..f59d4aa 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 a262a9f..88127b4 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 b4d54fa..d963cc6 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 */
OpenPOWER on IntegriCloud