diff options
| author | augustss <augustss@NetBSD.org> | 1999-11-16 12:04:28 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 1999-11-16 12:04:28 +0000 |
| commit | b019d68caa01d01f1e5cbbd4738ff43b2a06a7f0 (patch) | |
| tree | 677879aa519f1c72002095f2c0daca4d335ccd43 /sys/dev | |
| parent | 3fdb4d7b1128c969a838112344d2d88e5fbc2c10 (diff) | |
Some minor changes from OpenBSD.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/usb_port.h | 11 | ||||
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 19 |
2 files changed, 28 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 1736bba7454..6d56e0aeca3 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb_port.h,v 1.14 1999/10/14 01:18:39 augustss Exp $ */ +/* $NetBSD: usb_port.h,v 1.15 1999/11/16 12:04:28 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -171,6 +171,15 @@ __CONCAT(dname,_detach)(self, flags) \ #define powerhook_disestablish(hdl) #define PWR_RESUME 0 +#define logprintf printf + +#define swap_bytes_change_sign16_le swap_bytes_change_sign16 +#define change_sign16_swap_bytes_le change_sign16_swap_bytes +#define change_sign16_le change_sign16 + +#define realloc usb_realloc +void *usb_realloc __P((void *, u_int, int, int)); + typedef struct device device_ptr_t; #define USBBASEDEVICE struct device #define USBDEV(bdev) (&(bdev)) diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 06f84003419..7fa59b9ca58 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.53 1999/11/12 00:34:58 augustss Exp $ */ +/* $NetBSD: usb_subr.c,v 1.54 1999/11/16 12:04:29 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1255,3 +1255,20 @@ usb_disconnect_port(up, parent) usb_free_device(dev); } +#ifdef __OpenBSD__ +void *usb_realloc(p, size, pool, flags) + void *p; + u_int size; + int pool; + int flags; +{ + void *q; + + q = malloc(size, pool, flags); + if (q == NULL) + return (NULL); + bcopy(p, q, size); + free(p, pool); + return (q); +} +#endif |
