Lines Matching refs:softc
106 void *softc; /**< current driver's variables */
713 * @brief Find the softc field of a device given a unit number
718 * @returns the softc field of the device with the given
1036 * @brief Return the device's softc field
1038 * The softc is allocated and zeroed when a driver is attached, based
1044 return (dev->softc);
1048 * @brief Set the device's softc field
1050 * Most drivers do not need to use this since the softc is allocated
1054 device_set_softc(device_t dev, void *softc)
1056 if (dev->softc && !(dev->flags & DF_EXTERNALSOFTC))
1057 bsd_free(dev->softc, M_BUS_SC);
1058 dev->softc = softc;
1059 if (dev->softc)
1066 * @brief Free claimed softc
1068 * Most drivers do not need to use this since the softc is freed
1072 device_free_softc(void *softc)
1074 bsd_free(softc, M_BUS_SC);
1078 * @brief Claim softc
1081 * allocated softc using "device_free_softc()". This function is
1082 * useful when the driver is refcounting the softc and the softc
1088 if (dev->softc)
1394 dev->softc = NULL;
2392 if (dev->softc && !(dev->flags & DF_EXTERNALSOFTC)) {
2393 bsd_free(dev->softc, M_BUS_SC);
2394 dev->softc = NULL;
2402 dev->softc = bsd_malloc(driver->size, M_BUS_SC,
2404 if (!dev->softc) {
2760 1, /* no softc */
2902 (dev->softc? "":"no "),
2960 indentprintf(("driver %s: softc size = %zd\n",