Module Name: src Committed By: riastradh Date: Thu Mar 3 06:27:21 UTC 2022
Modified Files: src/sys/arch/evbmips/gdium: bonito_mainbus.c src/sys/arch/evbmips/loongson: bonito_mainbus.c src/sys/arch/mips/sibyte/pci: sbbrz.c Log Message: mips: Use device_set_private in a few drivers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/gdium/bonito_mainbus.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/loongson/bonito_mainbus.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/sibyte/pci/sbbrz.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbmips/gdium/bonito_mainbus.c diff -u src/sys/arch/evbmips/gdium/bonito_mainbus.c:1.5 src/sys/arch/evbmips/gdium/bonito_mainbus.c:1.6 --- src/sys/arch/evbmips/gdium/bonito_mainbus.c:1.5 Sat Aug 7 16:18:51 2021 +++ src/sys/arch/evbmips/gdium/bonito_mainbus.c Thu Mar 3 06:27:20 2022 @@ -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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -70,7 +70,7 @@ bonito_mainbus_attach(device_t parent, d 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. Index: src/sys/arch/evbmips/loongson/bonito_mainbus.c diff -u src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.5 src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.6 --- src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.5 Sat Aug 7 16:18:51 2021 +++ src/sys/arch/evbmips/loongson/bonito_mainbus.c Thu Mar 3 06:27:21 2022 @@ -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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,7 @@ bonito_mainbus_attach(device_t parent, d 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 Index: src/sys/arch/mips/sibyte/pci/sbbrz.c diff -u src/sys/arch/mips/sibyte/pci/sbbrz.c:1.8 src/sys/arch/mips/sibyte/pci/sbbrz.c:1.9 --- src/sys/arch/mips/sibyte/pci/sbbrz.c:1.8 Sat Jan 22 15:10:31 2022 +++ src/sys/arch/mips/sibyte/pci/sbbrz.c Thu Mar 3 06:27:21 2022 @@ -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 s /* 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