Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Move MALLOC_DEFINE()s from usb_mem.c to usb_subr.c.
details: https://anonhg.NetBSD.org/src/rev/cc5a9b27af35
branches: trunk
changeset: 763454:cc5a9b27af35
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Mar 20 17:38:11 2011 +0000
description:
Move MALLOC_DEFINE()s from usb_mem.c to usb_subr.c.
usb_mem.c provides functions for DMA memory allocation
that is required by DMA capable host controllers only,
but MALLOC_DEFINE() isn't DMA specific and could be required
by any USB drivers.
Discussed on current-users.
diffstat:
sys/dev/usb/usb_mem.c | 8 ++------
sys/dev/usb/usb_subr.c | 8 ++++++--
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (58 lines):
diff -r e86d136edc80 -r cc5a9b27af35 sys/dev/usb/usb_mem.c
--- a/sys/dev/usb/usb_mem.c Sun Mar 20 17:32:19 2011 +0000
+++ b/sys/dev/usb/usb_mem.c Sun Mar 20 17:38:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_mem.c,v 1.45 2011/01/04 01:37:55 matt Exp $ */
+/* $NetBSD: usb_mem.c,v 1.46 2011/03/20 17:38:11 tsutsui Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.45 2011/01/04 01:37:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.46 2011/03/20 17:38:11 tsutsui Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -75,10 +75,6 @@
#define DPRINTFN(n,x)
#endif
-MALLOC_DEFINE(M_USB, "USB", "USB misc. memory");
-MALLOC_DEFINE(M_USBDEV, "USB device", "USB device driver");
-MALLOC_DEFINE(M_USBHC, "USB HC", "USB host controller");
-
#define USB_MEM_SMALL 64
#define USB_MEM_CHUNKS 64
#define USB_MEM_BLOCK (USB_MEM_SMALL * USB_MEM_CHUNKS)
diff -r e86d136edc80 -r cc5a9b27af35 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sun Mar 20 17:32:19 2011 +0000
+++ b/sys/dev/usb/usb_subr.c Sun Mar 20 17:38:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.177 2010/11/03 22:34:24 dyoung Exp $ */
+/* $NetBSD: usb_subr.c,v 1.178 2011/03/20 17:38:11 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.177 2010/11/03 22:34:24 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.178 2011/03/20 17:38:11 tsutsui Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usbverbose.h"
@@ -68,6 +68,10 @@
#define DPRINTFN(n,x)
#endif
+MALLOC_DEFINE(M_USB, "USB", "USB misc. memory");
+MALLOC_DEFINE(M_USBDEV, "USB device", "USB device driver");
+MALLOC_DEFINE(M_USBHC, "USB HC", "USB host controller");
+
Static usbd_status usbd_set_config(usbd_device_handle, int);
Static void usbd_devinfo(usbd_device_handle, int, char *, size_t);
Static void usbd_devinfo_vp(usbd_device_handle, char *, size_t, char *, size_t,
Home |
Main Index |
Thread Index |
Old Index