140 nulldev, /* probe */
141 tvhci_attach, /* attach and detach are mandatory */
142 tvhci_detach,
143 nodev, /* reset */
144 &tvhci_cb_ops, /* cb_ops */
145 &tvhci_bus_ops, /* bus_ops */
146 NULL, /* power */
147 ddi_quiesce_not_needed, /* quiesce */
148 };
149
150 extern struct mod_ops mod_driverops;
151
152 static struct modldrv modldrv = {
153 &mod_driverops,
154 "test vhci driver",
155 &tvhci_ops
156 };
157
158 static struct modlinkage modlinkage = {
159 MODREV_1,
160 &modldrv,
161 NULL
162 };
163
164 int
165 _init(void)
166 {
167 int rval;
168
169 if ((rval = ddi_soft_state_init(&tvhci_state,
170 sizeof (struct tvhci_state), 2)) != 0) {
171 return (rval);
172 }
173
174 if ((rval = mod_install(&modlinkage)) != 0) {
175 ddi_soft_state_fini(&tvhci_state);
176 }
177 return (rval);
178 }
179
180
181 int
|
140 nulldev, /* probe */
141 tvhci_attach, /* attach and detach are mandatory */
142 tvhci_detach,
143 nodev, /* reset */
144 &tvhci_cb_ops, /* cb_ops */
145 &tvhci_bus_ops, /* bus_ops */
146 NULL, /* power */
147 ddi_quiesce_not_needed, /* quiesce */
148 };
149
150 extern struct mod_ops mod_driverops;
151
152 static struct modldrv modldrv = {
153 &mod_driverops,
154 "test vhci driver",
155 &tvhci_ops
156 };
157
158 static struct modlinkage modlinkage = {
159 MODREV_1,
160 { &modldrv, NULL }
161 };
162
163 int
164 _init(void)
165 {
166 int rval;
167
168 if ((rval = ddi_soft_state_init(&tvhci_state,
169 sizeof (struct tvhci_state), 2)) != 0) {
170 return (rval);
171 }
172
173 if ((rval = mod_install(&modlinkage)) != 0) {
174 ddi_soft_state_fini(&tvhci_state);
175 }
176 return (rval);
177 }
178
179
180 int
|