3527 lofi_info, /* info */
3528 nulldev, /* identify */
3529 nulldev, /* probe */
3530 lofi_attach, /* attach */
3531 lofi_detach, /* detach */
3532 nodev, /* reset */
3533 &lofi_cb_ops, /* driver operations */
3534 NULL, /* no bus operations */
3535 NULL, /* power */
3536 ddi_quiesce_not_needed, /* quiesce */
3537 };
3538
3539 static struct modldrv modldrv = {
3540 &mod_driverops,
3541 "loopback file driver",
3542 &lofi_ops,
3543 };
3544
3545 static struct modlinkage modlinkage = {
3546 MODREV_1,
3547 &modldrv,
3548 NULL
3549 };
3550
3551 int
3552 _init(void)
3553 {
3554 int error;
3555
3556 list_create(&lofi_list, sizeof (struct lofi_state),
3557 offsetof(struct lofi_state, ls_list));
3558
3559 error = ddi_soft_state_init((void **)&lofi_statep,
3560 sizeof (struct lofi_state), 0);
3561 if (error) {
3562 list_destroy(&lofi_list);
3563 return (error);
3564 }
3565
3566 /*
3567 * The minor number is stored as id << LOFI_CMLB_SHIFT as
3568 * we need to reserve space for cmlb minor numbers.
|
3527 lofi_info, /* info */
3528 nulldev, /* identify */
3529 nulldev, /* probe */
3530 lofi_attach, /* attach */
3531 lofi_detach, /* detach */
3532 nodev, /* reset */
3533 &lofi_cb_ops, /* driver operations */
3534 NULL, /* no bus operations */
3535 NULL, /* power */
3536 ddi_quiesce_not_needed, /* quiesce */
3537 };
3538
3539 static struct modldrv modldrv = {
3540 &mod_driverops,
3541 "loopback file driver",
3542 &lofi_ops,
3543 };
3544
3545 static struct modlinkage modlinkage = {
3546 MODREV_1,
3547 { &modldrv, NULL }
3548 };
3549
3550 int
3551 _init(void)
3552 {
3553 int error;
3554
3555 list_create(&lofi_list, sizeof (struct lofi_state),
3556 offsetof(struct lofi_state, ls_list));
3557
3558 error = ddi_soft_state_init((void **)&lofi_statep,
3559 sizeof (struct lofi_state), 0);
3560 if (error) {
3561 list_destroy(&lofi_list);
3562 return (error);
3563 }
3564
3565 /*
3566 * The minor number is stored as id << LOFI_CMLB_SHIFT as
3567 * we need to reserve space for cmlb minor numbers.
|