Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-i2c-spi-conf2]: src/sys/arch/sparc64/sparc64 Fix dum-dum pointer...
details: https://anonhg.NetBSD.org/src/rev/0381e4120269
branches: thorpej-i2c-spi-conf2
changeset: 1024899:0381e4120269
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Sep 12 18:38:06 2021 +0000
description:
Fix dum-dum pointer mistake.
diffstat:
sys/arch/sparc64/sparc64/ofw_patch.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 97d622cb3311 -r 0381e4120269 sys/arch/sparc64/sparc64/ofw_patch.c
--- a/sys/arch/sparc64/sparc64/ofw_patch.c Sat Sep 11 17:22:35 2021 +0000
+++ b/sys/arch/sparc64/sparc64/ofw_patch.c Sun Sep 12 18:38:06 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_patch.c,v 1.7.14.5 2021/09/11 17:22:36 thorpej Exp $ */
+/* $NetBSD: ofw_patch.c,v 1.7.14.6 2021/09/12 18:38:06 thorpej Exp $ */
/*-
* Copyright (c) 2020, 2021 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.7.14.5 2021/09/11 17:22:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.7.14.6 2021/09/12 18:38:06 thorpej Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -732,12 +732,13 @@
const struct device_compatible_entry *dce;
void (*fn)(device_t, void *);
devhandle_t devhandle;
+ const char *cptab[1];
devhandle = device_handle(dev);
if (! system_fixup_entry_initialized) {
- dce = device_compatible_lookup((const char **)&machine_model, 1,
- system_fixup_table);
+ cptab[0] = machine_model;
+ dce = device_compatible_lookup(cptab, 1, system_fixup_table);
if (dce != NULL) {
system_fixup_entry = dce->data;
}
@@ -762,8 +763,8 @@
MAX_PACKAGE_PATH);
package_path[MAX_PACKAGE_PATH - 1] = '\0'; /* sanity */
if (path_size > 0) {
- const char *ccp = package_path;
- dce = device_compatible_lookup(&ccp, 1,
+ cptab[0] = package_path;
+ dce = device_compatible_lookup(cptab, 1,
system_fixup_entry->dtnode_fixups);
if (dce != NULL && (fn = dce->data) != NULL) {
(*fn)(dev, aux);
Home |
Main Index |
Thread Index |
Old Index