540 nulldev, /* Probe */
541 ohci_attach, /* Attach */
542 ohci_detach, /* Detach */
543 nodev, /* Reset */
544 &ohci_cb_ops, /* Driver operations */
545 &usba_hubdi_busops, /* Bus operations */
546 usba_hubdi_root_hub_power, /* Power */
547 ohci_quiesce, /* Quiesce */
548 };
549
550 /*
551 * The USBA library must be loaded for this driver.
552 */
553 static struct modldrv modldrv = {
554 &mod_driverops, /* Type of module. This one is a driver */
555 "USB OpenHCI Driver", /* Name of the module. */
556 &ohci_ops, /* Driver ops */
557 };
558
559 static struct modlinkage modlinkage = {
560 MODREV_1, (void *)&modldrv, NULL
561 };
562
563
564 int
565 _init(void)
566 {
567 int error;
568
569 /* Initialize the soft state structures */
570 if ((error = ddi_soft_state_init(&ohci_statep, sizeof (ohci_state_t),
571 OHCI_INSTS)) != 0) {
572 return (error);
573 }
574
575 /* Install the loadable module */
576 if ((error = mod_install(&modlinkage)) != 0) {
577 ddi_soft_state_fini(&ohci_statep);
578 }
579
580 return (error);
|
540 nulldev, /* Probe */
541 ohci_attach, /* Attach */
542 ohci_detach, /* Detach */
543 nodev, /* Reset */
544 &ohci_cb_ops, /* Driver operations */
545 &usba_hubdi_busops, /* Bus operations */
546 usba_hubdi_root_hub_power, /* Power */
547 ohci_quiesce, /* Quiesce */
548 };
549
550 /*
551 * The USBA library must be loaded for this driver.
552 */
553 static struct modldrv modldrv = {
554 &mod_driverops, /* Type of module. This one is a driver */
555 "USB OpenHCI Driver", /* Name of the module. */
556 &ohci_ops, /* Driver ops */
557 };
558
559 static struct modlinkage modlinkage = {
560 MODREV_1, { (void *)&modldrv, NULL }
561 };
562
563
564 int
565 _init(void)
566 {
567 int error;
568
569 /* Initialize the soft state structures */
570 if ((error = ddi_soft_state_init(&ohci_statep, sizeof (ohci_state_t),
571 OHCI_INSTS)) != 0) {
572 return (error);
573 }
574
575 /* Install the loadable module */
576 if ((error = mod_install(&modlinkage)) != 0) {
577 ddi_soft_state_fini(&ohci_statep);
578 }
579
580 return (error);
|