diff options
-rw-r--r-- | sys/dev/usb/udl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index 34f8bfcff18..3c1be14265f 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udl.c,v 1.24 2009/08/26 12:23:39 mglocker Exp $ */ +/* $OpenBSD: udl.c,v 1.25 2009/08/26 19:07:45 mglocker Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -27,7 +27,7 @@ * to deal with similar challenges, like no direct access to the video * memory. * - * TODO: - Cleanup the bcopy() and endianess mess. + * TODO: - Cleanup the endianess mess. * - Reduce padding overhead in compressed blocks. */ @@ -999,7 +999,7 @@ udl_cmd_insert_int_2(struct udl_softc *sc, uint16_t value) udl_cmd_insert_check(cb, 2); lvalue = htobe16(value); - bcopy(&lvalue, cb->buf + cb->off, 2); + *(uint16_t *)(cb->buf + cb->off) = lvalue; cb->off += 2; } @@ -1016,7 +1016,7 @@ udl_cmd_insert_int_3(struct udl_softc *sc, uint32_t value) #else lvalue = htobe32(value) >> 8; #endif - bcopy(&lvalue, cb->buf + cb->off, 3); + *(uint32_t *)(cb->buf + cb->off) = lvalue; cb->off += 3; } @@ -1030,7 +1030,7 @@ udl_cmd_insert_int_4(struct udl_softc *sc, uint32_t value) udl_cmd_insert_check(cb, 4); lvalue = htobe32(value); - bcopy(&lvalue, cb->buf + cb->off, 4); + *(uint32_t *)(cb->buf + cb->off) = lvalue; cb->off += 4; } @@ -1434,7 +1434,7 @@ udl_fb_off_write(struct udl_softc *sc, uint16_t rgb16, uint32_t off, for (i = 0; i < lwidth; i += 2) { lrgb16 = htobe16(rgb16); - bcopy(&lrgb16, buf + i, 2); + *(uint16_t *)(buf + i) = lrgb16; } udl_cmd_insert_buf(sc, buf, lwidth); @@ -1554,7 +1554,7 @@ udl_fb_off_write_comp(struct udl_softc *sc, uint16_t rgb16, uint32_t off, for (i = 0; i < lwidth; i += 2) { lrgb16 = htobe16(rgb16); - bcopy(&lrgb16, buf + i, 2); + *(uint16_t *)(buf + i) = lrgb16; } /* @@ -1750,7 +1750,7 @@ udl_draw_char(struct udl_softc *sc, uint16_t fg, uint16_t bg, u_int uc, lrgb16 = htobe16(fg); else lrgb16 = htobe16(bg); - bcopy(&lrgb16, line, 2); + *line = lrgb16; line++; } (sc->udl_fb_buf_write)(sc, buf, x, ly, font->fontwidth); |