static struct dev_ops xx_dev_ops = { DEVO_REV, /* devo_rev, */ 0, /* devo_refcnt */ xxgetinfo, /* getinfo(9E) */ nulldev, /* identify(9E) */ xxprobe, /* probe(9E) */ xxattach, /* attach(9E) */ xxdetach, /* detach(9E) */ nodev, /* devo_reset */ &xx_cb_ops, /* devo_cb_ops */ NULL, /* devo_bus_ops */ &xxpower /* power(9E) */ };
The dev_ops(9S) structure enables the kernel to find the autoconfiguration entry points of the device driver. The devo_rev field identifies the revision number of the structure itself, and must be set to DEVO_REV. The devo_refcnt field must be initialized to zero. The function address fields should be filled in with the address of the appropriate driver entry point. The exceptions are:
If a probe(9E) routine is not needed, set the devo_probe field to nulldev(9F).
identify(9E) is obsolete and no longer required. Set this field to nulldev(9F).
Set devo_reset to nodev(9F).
Drivers for devices that provide Power Management functionality must have a power(9E) entry point. If a power(9E) routine is not needed, set this field to NULL.
The devo_cb_ops member should include the address of the cb_ops(9S) structure. The devo_bus_ops field must be set to NULL.