-/* $OpenBSD: subr_autoconf.c,v 1.95 2021/10/26 16:29:49 deraadt Exp $ */
+/* $OpenBSD: subr_autoconf.c,v 1.96 2022/04/07 09:37:32 tb Exp $ */
/* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */
/*
struct cfdata *cf;
struct device *dev;
struct cfdriver *cd;
- struct cfattach *ca;
+ const struct cfattach *ca;
mtx_enter(&autoconf_attdet_mtx);
while (autoconf_attdet < 0)
{
struct device *dev;
struct cfdriver *cd;
- struct cfattach *ca;
+ const struct cfattach *ca;
cd = cf->cf_driver;
ca = cf->cf_attach;
config_detach(struct device *dev, int flags)
{
struct cfdata *cf;
- struct cfattach *ca;
+ const struct cfattach *ca;
struct cfdriver *cd;
int rv = 0, i;
#ifdef DIAGNOSTIC
int
config_suspend(struct device *dev, int act)
{
- struct cfattach *ca = dev->dv_cfdata->cf_attach;
+ const struct cfattach *ca = dev->dv_cfdata->cf_attach;
int r;
device_ref(dev);
void
device_unref(struct device *dv)
{
- struct cfattach *ca;
+ const struct cfattach *ca;
if (atomic_dec_int_nv(&dv->dv_ref) == 0) {
ca = dv->dv_cfdata->cf_attach;
-/* $OpenBSD: device.h,v 1.62 2022/02/16 06:41:27 deraadt Exp $ */
+/* $OpenBSD: device.h,v 1.63 2022/04/07 09:37:32 tb Exp $ */
/* $NetBSD: device.h,v 1.15 1996/04/09 20:55:24 cgd Exp $ */
/*
* Configuration data (i.e., data placed in ioconf.c).
*/
struct cfdata {
- struct cfattach *cf_attach; /* config attachment */
+ const struct cfattach *cf_attach; /* config attachment */
struct cfdriver *cf_driver; /* config driver */
short cf_unit; /* unit number */
short cf_fstate; /* finding state (below) */