46 nulldev,
47 NULL,
48 NULL,
49 NULL,
50 ddi_quiesce_not_needed, /* quiesce */
51 };
52 /*
53 * This is the loadable module wrapper.
54 */
55 #include <sys/modctl.h>
56
57 extern struct mod_ops mod_driverops;
58
59 static struct modldrv modldrv = {
60 &mod_driverops, /* Type of module. This one is a driver */
61 "PCMCIA Socket Driver", /* Name of the module. */
62 &pcs_devops, /* driver ops */
63 };
64
65 static struct modlinkage modlinkage = {
66 MODREV_1, (void *)&modldrv, NULL
67 };
68
69 struct pcs_inst {
70 dev_info_t *dip;
71 } *pcs_instances;
72
73 int
74 _init()
75 {
76 int ret;
77 if ((ret = ddi_soft_state_init((void **)&pcs_instances,
78 sizeof (struct pcs_inst), 1)) != 0)
79 return (ret);
80 if ((ret = mod_install(&modlinkage)) != 0) {
81 ddi_soft_state_fini((void **)&pcs_instances);
82 }
83 return (ret);
84 }
85
86 int
|
46 nulldev,
47 NULL,
48 NULL,
49 NULL,
50 ddi_quiesce_not_needed, /* quiesce */
51 };
52 /*
53 * This is the loadable module wrapper.
54 */
55 #include <sys/modctl.h>
56
57 extern struct mod_ops mod_driverops;
58
59 static struct modldrv modldrv = {
60 &mod_driverops, /* Type of module. This one is a driver */
61 "PCMCIA Socket Driver", /* Name of the module. */
62 &pcs_devops, /* driver ops */
63 };
64
65 static struct modlinkage modlinkage = {
66 MODREV_1, { (void *)&modldrv, NULL }
67 };
68
69 struct pcs_inst {
70 dev_info_t *dip;
71 } *pcs_instances;
72
73 int
74 _init()
75 {
76 int ret;
77 if ((ret = ddi_soft_state_init((void **)&pcs_instances,
78 sizeof (struct pcs_inst), 1)) != 0)
79 return (ret);
80 if ((ret = mod_install(&modlinkage)) != 0) {
81 ddi_soft_state_fini((void **)&pcs_instances);
82 }
83 return (ret);
84 }
85
86 int
|