95 0, /* refcnt */
96 ddi_getinfo_1to1, /* info */
97 nulldev, /* identify */
98 NULL, /* probe */
99 smp_attach, /* attach */
100 smp_detach, /* detach */
101 nodev, /* reset */
102 &smp_cb_ops, /* driver operations */
103 (struct bus_ops *)0, /* bus operations */
104 NULL, /* power */
105 ddi_quiesce_not_needed, /* quiesce */
106 };
107
108 static void *smp_soft_state = NULL;
109
110 static struct modldrv modldrv = {
111 &mod_driverops, "smp device driver", &smp_dev_ops
112 };
113
114 static struct modlinkage modlinkage = {
115 MODREV_1, &modldrv, NULL
116 };
117
118 int
119 _init(void)
120 {
121 int err;
122
123 if ((err = ddi_soft_state_init(&smp_soft_state,
124 sizeof (smp_state_t), SMP_ESTIMATED_NUM_DEVS)) != 0) {
125 return (err);
126 }
127
128 if ((err = mod_install(&modlinkage)) != 0) {
129 ddi_soft_state_fini(&smp_soft_state);
130 }
131
132 return (err);
133 }
134
135 int
|
95 0, /* refcnt */
96 ddi_getinfo_1to1, /* info */
97 nulldev, /* identify */
98 NULL, /* probe */
99 smp_attach, /* attach */
100 smp_detach, /* detach */
101 nodev, /* reset */
102 &smp_cb_ops, /* driver operations */
103 (struct bus_ops *)0, /* bus operations */
104 NULL, /* power */
105 ddi_quiesce_not_needed, /* quiesce */
106 };
107
108 static void *smp_soft_state = NULL;
109
110 static struct modldrv modldrv = {
111 &mod_driverops, "smp device driver", &smp_dev_ops
112 };
113
114 static struct modlinkage modlinkage = {
115 MODREV_1, { &modldrv, NULL }
116 };
117
118 int
119 _init(void)
120 {
121 int err;
122
123 if ((err = ddi_soft_state_init(&smp_soft_state,
124 sizeof (smp_state_t), SMP_ESTIMATED_NUM_DEVS)) != 0) {
125 return (err);
126 }
127
128 if ((err = mod_install(&modlinkage)) != 0) {
129 ddi_soft_state_fini(&smp_soft_state);
130 }
131
132 return (err);
133 }
134
135 int
|