summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2007-07-31 21:18:50 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2007-07-31 21:18:50 +0000
commit5be8c4b434e9adf32dd19a223ecc22db5c2a45e4 (patch)
tree84979a16ba7215db188f375e1b6663166f660286
parentca8b394d13f63f9b5f90b2b767bc6f1ee20edf6a (diff)
remove magic numbers: use PCAGPIO_NPINS instead (no binary change); ok deraadt@
-rw-r--r--sys/dev/i2c/pca9554.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/pca9554.c b/sys/dev/i2c/pca9554.c
index 473c3563f65..4c05f07930b 100644
--- a/sys/dev/i2c/pca9554.c
+++ b/sys/dev/i2c/pca9554.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pca9554.c,v 1.11 2007/06/24 05:34:35 dlg Exp $ */
+/* $OpenBSD: pca9554.c,v 1.12 2007/07/31 21:18:49 cnst Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -141,8 +141,8 @@ pcagpio_attach(struct device *parent, struct device *self, void *aux)
#endif
printf(":");
- if (8 - outputs)
- printf(" %d inputs", 8 - outputs);
+ if (PCAGPIO_NPINS - outputs)
+ printf(" %d inputs", PCAGPIO_NPINS - outputs);
if (outputs)
printf(" %d outputs", outputs);
printf("\n");