summaryrefslogtreecommitdiffstats
path: root/sys/dev/musycc
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
commitdd75d1d73b4f3034c1d9f621a49fff58b1d71eb1 (patch)
tree197ae73617ae75afe008897f6906b84835589ea2 /sys/dev/musycc
parented5dbfbd3cd619638a7baac288f548aa1398edac (diff)
downloadFreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.zip
FreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.tar.gz
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
Diffstat (limited to 'sys/dev/musycc')
-rw-r--r--sys/dev/musycc/musycc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/musycc/musycc.c b/sys/dev/musycc/musycc.c
index 76ed767..fa11689 100644
--- a/sys/dev/musycc/musycc.c
+++ b/sys/dev/musycc/musycc.c
@@ -1012,8 +1012,7 @@ musycc_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
if (sc->chan[chan] == NULL) {
- MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_WAITOK);
- bzero(sch, sizeof(*sch));
+ MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_WAITOK | M_ZERO);
sch->sc = sc;
sch->state = DOWN;
sch->chan = chan;
@@ -1340,8 +1339,7 @@ musycc_attach(device_t self)
f = pci_get_function(self);
/* For function zero allocate a csoftc */
if (f == 0) {
- MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_WAITOK);
- bzero(csc, sizeof(*csc));
+ MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_WAITOK | M_ZERO);
csc->bus = pci_get_bus(self);
csc->slot = pci_get_slot(self);
LIST_INSERT_HEAD(&sc_list, csc, list);
@@ -1415,8 +1413,7 @@ musycc_attach(device_t self)
sc->reg = (struct globalr *)
(csc->virbase[0] + i * 0x800);
MALLOC(sc->mycg, struct mycg *,
- sizeof(struct mycg), M_MUSYCC, M_WAITOK);
- bzero(sc->mycg, sizeof(struct mycg));
+ sizeof(struct mycg), M_MUSYCC, M_WAITOK | M_ZERO);
sc->ram = &sc->mycg->cg;
error = ng_make_node_common(&ngtypestruct, &sc->node);
OpenPOWER on IntegriCloud