Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts


 119 static struct {
 120         const char      *name;
 121         const char      *type;
 122         sbd_error_t     *(*new)(drmach_device_t *, drmachid_t *);
 123 } drmach_name2type[] = {
 124         { ACPIDEV_NODE_NAME_CPU,        DRMACH_DEVTYPE_CPU, drmach_cpu_new },
 125         { ACPIDEV_NODE_NAME_MEMORY,     DRMACH_DEVTYPE_MEM, drmach_mem_new },
 126         { ACPIDEV_NODE_NAME_PCI,        DRMACH_DEVTYPE_PCI, drmach_io_new  },
 127 };
 128 
 129 /*
 130  * drmach autoconfiguration data structures and interfaces
 131  */
 132 static struct modlmisc modlmisc = {
 133         &mod_miscops,
 134         "ACPI based DR v1.0"
 135 };
 136 
 137 static struct modlinkage modlinkage = {
 138         MODREV_1,
 139         (void *)&modlmisc,
 140         NULL
 141 };
 142 
 143 int
 144 _init(void)
 145 {
 146         int err;
 147 
 148         if ((err = drmach_init()) != 0) {
 149                 return (err);
 150         }
 151 
 152         if ((err = mod_install(&modlinkage)) != 0) {
 153                 drmach_fini();
 154         }
 155 
 156         return (err);
 157 }
 158 
 159 int
 160 _fini(void)




 119 static struct {
 120         const char      *name;
 121         const char      *type;
 122         sbd_error_t     *(*new)(drmach_device_t *, drmachid_t *);
 123 } drmach_name2type[] = {
 124         { ACPIDEV_NODE_NAME_CPU,        DRMACH_DEVTYPE_CPU, drmach_cpu_new },
 125         { ACPIDEV_NODE_NAME_MEMORY,     DRMACH_DEVTYPE_MEM, drmach_mem_new },
 126         { ACPIDEV_NODE_NAME_PCI,        DRMACH_DEVTYPE_PCI, drmach_io_new  },
 127 };
 128 
 129 /*
 130  * drmach autoconfiguration data structures and interfaces
 131  */
 132 static struct modlmisc modlmisc = {
 133         &mod_miscops,
 134         "ACPI based DR v1.0"
 135 };
 136 
 137 static struct modlinkage modlinkage = {
 138         MODREV_1,
 139         {   (void *)&modlmisc,
 140             NULL }
 141 };
 142 
 143 int
 144 _init(void)
 145 {
 146         int err;
 147 
 148         if ((err = drmach_init()) != 0) {
 149                 return (err);
 150         }
 151 
 152         if ((err = mod_install(&modlinkage)) != 0) {
 153                 drmach_fini();
 154         }
 155 
 156         return (err);
 157 }
 158 
 159 int
 160 _fini(void)