From 7fcda4e99171d4bf1e23fc0bd9b858ec08772593 Mon Sep 17 00:00:00 2001 From: riastradh Date: Thu, 3 Mar 2022 06:27:20 +0000 Subject: [PATCH] mips: Use device_set_private in a few drivers. --- sys/arch/evbmips/gdium/bonito_mainbus.c | 6 +++--- sys/arch/evbmips/loongson/bonito_mainbus.c | 6 +++--- sys/arch/mips/sibyte/pci/sbbrz.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/arch/evbmips/gdium/bonito_mainbus.c b/sys/arch/evbmips/gdium/bonito_mainbus.c index d67fc3529759..7731c67a837c 100644 --- a/sys/arch/evbmips/gdium/bonito_mainbus.c +++ b/sys/arch/evbmips/gdium/bonito_mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: bonito_mainbus.c,v 1.5 2021/08/07 16:18:51 thorpej Exp $ */ +/* $NetBSD: bonito_mainbus.c,v 1.6 2022/03/03 06:27:20 riastradh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.5 2021/08/07 16:18:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.6 2022/03/03 06:27:20 riastradh Exp $"); #include #include @@ -70,7 +70,7 @@ bonito_mainbus_attach(device_t parent, device_t self, void *aux) struct gdium_config * const gc = &gdium_configuration; pcireg_t rev; - self->dv_private = &gc->gc_bonito; + device_set_private(self, &gc->gc_bonito); /* * There is only one PCI controller on a Loongson chip. diff --git a/sys/arch/evbmips/loongson/bonito_mainbus.c b/sys/arch/evbmips/loongson/bonito_mainbus.c index 1330742eede3..e3344d54a959 100644 --- a/sys/arch/evbmips/loongson/bonito_mainbus.c +++ b/sys/arch/evbmips/loongson/bonito_mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: bonito_mainbus.c,v 1.5 2021/08/07 16:18:51 thorpej Exp $ */ +/* $NetBSD: bonito_mainbus.c,v 1.6 2022/03/03 06:27:21 riastradh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.5 2021/08/07 16:18:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.6 2022/03/03 06:27:21 riastradh Exp $"); #include #include @@ -73,7 +73,7 @@ bonito_mainbus_attach(device_t parent, device_t self, void *aux) pcireg_t rev; bool compatible; - self->dv_private = __UNCONST(&sys_platform->bonito_config); + device_set_private(self, __UNCONST(&sys_platform->bonito_config)); /* * Loongson 2F processors do not use a real Bonito64 chip but diff --git a/sys/arch/mips/sibyte/pci/sbbrz.c b/sys/arch/mips/sibyte/pci/sbbrz.c index b7213720bc04..5a405202a5f1 100644 --- a/sys/arch/mips/sibyte/pci/sbbrz.c +++ b/sys/arch/mips/sibyte/pci/sbbrz.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbbrz.c,v 1.8 2022/01/22 15:10:31 skrll Exp $ */ +/* $NetBSD: sbbrz.c,v 1.9 2022/03/03 06:27:21 riastradh Exp $ */ /* * Copyright 2000, 2001 @@ -181,7 +181,7 @@ sbbrz_attach(device_t parent, device_t self, void *aux) /* note that we've attached the bridge; can't have two. */ sc->sc_dev = self; - self->dv_private = sc; + device_set_private(self, sc); /* * set up the bridge's info; done once at console init time