Date: Fri, 2 Jun 2006 06:18:34 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 98308 for review Message-ID: <200606020618.k526IYG8043869@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=98308 Change 98308 by imp@imp_lighthouse on 2006/06/02 06:18:16 pci attachment now links. malloc the ivars, rather than get them to avoid a core dump Affected files ... .. //depot/projects/arm/src/sys/dev/sdhc/sdhc.c#1 add .. //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 edit .. //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 edit Differences ... ==== //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ #include <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> +#include <sys/malloc.h> #include <sys/module.h> #include <sys/systm.h> @@ -80,7 +81,8 @@ bus_release_resource(dev, SYS_RES_MEMORY, i, res); continue; } - ivars = (struct sdhc_ivars *) device_get_ivars(child); + ivars = (struct sdhc_ivars *) malloc(sizeof *ivars, M_DEVBUF, + M_WAITOK); ivars->res = res; device_set_ivars(child, ivars); } ==== //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 (text+ko) ==== @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/sdhc KMOD= sdhc -SRCS= sdhc_pci.c \ +SRCS= sdhc_pci.c sdhc.c \ device_if.h bus_if.h pci_if.h .include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606020618.k526IYG8043869>