88 ACPIDEV_STATUS_READY /* second probing finished */
89 } acpidev_status_t;
90
91 static acpidev_status_t acpidev_status = ACPIDEV_STATUS_UNKNOWN;
92 static kmutex_t acpidev_drv_lock;
93 static dev_info_t *acpidev_root_dip = NULL;
94
95 /* Boot time ACPI device enumerator. */
96 static void acpidev_boot_probe(int type);
97
98 /* DDI module auto configuration interface */
99 extern struct mod_ops mod_miscops;
100
101 static struct modlmisc modlmisc = {
102 &mod_miscops,
103 "ACPI device enumerator"
104 };
105
106 static struct modlinkage modlinkage = {
107 MODREV_1,
108 (void *)&modlmisc,
109 NULL
110 };
111
112 int
113 _init(void)
114 {
115 int err;
116
117 if ((err = mod_install(&modlinkage)) == 0) {
118 bzero(acpidev_object_type_mask,
119 sizeof (acpidev_object_type_mask));
120 mutex_init(&acpidev_drv_lock, NULL, MUTEX_DRIVER, NULL);
121 rw_init(&acpidev_class_lock, NULL, RW_DEFAULT, NULL);
122 acpidev_dr_init();
123 impl_bus_add_probe(acpidev_boot_probe);
124 } else {
125 cmn_err(CE_WARN, "!acpidev: failed to install driver.");
126 }
127
128 return (err);
129 }
|
88 ACPIDEV_STATUS_READY /* second probing finished */
89 } acpidev_status_t;
90
91 static acpidev_status_t acpidev_status = ACPIDEV_STATUS_UNKNOWN;
92 static kmutex_t acpidev_drv_lock;
93 static dev_info_t *acpidev_root_dip = NULL;
94
95 /* Boot time ACPI device enumerator. */
96 static void acpidev_boot_probe(int type);
97
98 /* DDI module auto configuration interface */
99 extern struct mod_ops mod_miscops;
100
101 static struct modlmisc modlmisc = {
102 &mod_miscops,
103 "ACPI device enumerator"
104 };
105
106 static struct modlinkage modlinkage = {
107 MODREV_1,
108 { (void *)&modlmisc, NULL }
109 };
110
111 int
112 _init(void)
113 {
114 int err;
115
116 if ((err = mod_install(&modlinkage)) == 0) {
117 bzero(acpidev_object_type_mask,
118 sizeof (acpidev_object_type_mask));
119 mutex_init(&acpidev_drv_lock, NULL, MUTEX_DRIVER, NULL);
120 rw_init(&acpidev_class_lock, NULL, RW_DEFAULT, NULL);
121 acpidev_dr_init();
122 impl_bus_add_probe(acpidev_boot_probe);
123 } else {
124 cmn_err(CE_WARN, "!acpidev: failed to install driver.");
125 }
126
127 return (err);
128 }
|