Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Patch for sys/dev/ic/org\iavc.c



Hello
Please review this patch. It is not possible to compile GENERIC_ISDN
(and consequently build a release) without this patch.

table and &table[0] point to the address of the first element of table

--- sys/dev/ic/org\iavc.c       2008-04-09 04:04:08 +0000
+++ sys/dev/ic/iavc.c   2008-03-22 08:14:52 +0000
@@ -892,7 +892,7 @@
     u_int8_t *dmabuf = 0, cmd;

     if (sc->sc_dma) {
-       dmabuf = amcc_get_byte(&sc->sc_recvbuf[0], &cmd);
+       dmabuf = amcc_get_byte(sc->sc_recvbuf, &cmd);
     } else {
        cmd = iavc_get_byte(sc);
     }
@@ -1004,9 +1004,9 @@
        /* Copy message to DMA buffer. */

        if (m->m_next)
-           dmabuf = amcc_put_byte(&sc->sc_sendbuf[0], SEND_DATA_B3_REQ);
+           dmabuf = amcc_put_byte(sc->sc_sendbuf, SEND_DATA_B3_REQ);
        else
-           dmabuf = amcc_put_byte(&sc->sc_sendbuf[0], SEND_MESSAGE);
+           dmabuf = amcc_put_byte(sc->sc_sendbuf, SEND_MESSAGE);

        dmabuf = amcc_put_word(dmabuf, m->m_len);
        memcpy(dmabuf, m->m_data, m->m_len);
@@ -1061,7 +1061,7 @@
     uint8_t *dmabuf;

     if (sc->sc_dma) {
-       memcpy(&sc->sc_sendbuf[0], m->m_data + 2, m->m_len - 2);
+       memcpy(sc->sc_sendbuf, m->m_data + 2, m->m_len - 2);
        txlen = m->m_len - 2;
     } else {


Home | Main Index | Thread Index | Old Index