summaryrefslogtreecommitdiffstats
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-08-15 15:42:57 +0000
committerhselasky <hselasky@FreeBSD.org>2012-08-15 15:42:57 +0000
commit2e74f8d2a5ec1615da87208faeb1c64735fc5c64 (patch)
tree99fdc32e57fe511a68b57a70585fea2b615a844d /sys/sys/bus.h
parent0f8b6a08b6cf5ed24bea18a23d546ae01738c2ef (diff)
downloadFreeBSD-src-2e74f8d2a5ec1615da87208faeb1c64735fc5c64.zip
FreeBSD-src-2e74f8d2a5ec1615da87208faeb1c64735fc5c64.tar.gz
Revert r239178 and implement two new functions, namely
"device_free_softc()" and "device_claim_softc()", to allow USB serial drivers refcounting the softc. These functions are used to grab the softc from auto-free and to free the softc back to the correct malloc type, respectivly. Discussed with: jhb MFC after: 2 weeks
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index 941819a..db6d3cf 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -464,11 +464,12 @@ int device_set_devclass(device_t dev, const char *classname);
int device_set_driver(device_t dev, driver_t *driver);
void device_set_flags(device_t dev, u_int32_t flags);
void device_set_softc(device_t dev, void *softc);
+void device_free_softc(void *softc);
+void device_claim_softc(device_t dev);
int device_set_unit(device_t dev, int unit); /* XXX DONT USE XXX */
int device_shutdown(device_t dev);
void device_unbusy(device_t dev);
void device_verbose(device_t dev);
-void device_free_softc(device_t dev, void *softc);
/*
* Access functions for devclass.
OpenPOWER on IntegriCloud