summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xhfc/xhfc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h
index 4e17d03..f6c525a 100644
--- a/xhfc/xhfc.h
+++ b/xhfc/xhfc.h
@@ -153,7 +153,8 @@ struct xhfc_pi {
#endif
};
-#define dchan_fifo(span) (span->port * 4 + 2)
+#define dchan_fifo(span) ((span)->port * 4 + 2)
+#define portno(span) ((span)->port + 1)
void xhfc_flush_fifo(struct xhfc* x, int fifo);
int xhfc_hdlc_init(struct xhfc* x);