1362 ddi_remove_minor_node(dip, NULL);
1363 }
1364
1365 usb_client_detach(dip, sc->sc_udev);
1366 ddi_soft_state_free(atu_soft_state_p, ddi_get_instance(dip));
1367
1368 return (DDI_SUCCESS);
1369 }
1370
1371 DDI_DEFINE_STREAM_OPS(atu_dev_ops, nulldev, nulldev, atu_attach,
1372 atu_detach, nodev, NULL, D_MP, NULL, ddi_quiesce_not_needed);
1373
1374 static struct modldrv atu_modldrv = {
1375 &mod_driverops,
1376 "atu driver v1.1",
1377 &atu_dev_ops
1378 };
1379
1380 static struct modlinkage modlinkage = {
1381 MODREV_1,
1382 (void *)&atu_modldrv,
1383 NULL
1384 };
1385
1386 int
1387 _info(struct modinfo *modinfop)
1388 {
1389 return (mod_info(&modlinkage, modinfop));
1390 }
1391
1392 int
1393 _init(void)
1394 {
1395 int status;
1396
1397 status = ddi_soft_state_init(&atu_soft_state_p,
1398 sizeof (struct atu_softc), 1);
1399 if (status != 0)
1400 return (status);
1401
1402 mac_init_ops(&atu_dev_ops, "atu");
1403 status = mod_install(&modlinkage);
|
1362 ddi_remove_minor_node(dip, NULL);
1363 }
1364
1365 usb_client_detach(dip, sc->sc_udev);
1366 ddi_soft_state_free(atu_soft_state_p, ddi_get_instance(dip));
1367
1368 return (DDI_SUCCESS);
1369 }
1370
1371 DDI_DEFINE_STREAM_OPS(atu_dev_ops, nulldev, nulldev, atu_attach,
1372 atu_detach, nodev, NULL, D_MP, NULL, ddi_quiesce_not_needed);
1373
1374 static struct modldrv atu_modldrv = {
1375 &mod_driverops,
1376 "atu driver v1.1",
1377 &atu_dev_ops
1378 };
1379
1380 static struct modlinkage modlinkage = {
1381 MODREV_1,
1382 { (void *)&atu_modldrv, NULL }
1383 };
1384
1385 int
1386 _info(struct modinfo *modinfop)
1387 {
1388 return (mod_info(&modlinkage, modinfop));
1389 }
1390
1391 int
1392 _init(void)
1393 {
1394 int status;
1395
1396 status = ddi_soft_state_init(&atu_soft_state_p,
1397 sizeof (struct atu_softc), 1);
1398 if (status != 0)
1399 return (status);
1400
1401 mac_init_ops(&atu_dev_ops, "atu");
1402 status = mod_install(&modlinkage);
|