Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/spi Make this at least compile - I have no way to test.
details: https://anonhg.NetBSD.org/src/rev/0298f67db2f0
branches: trunk
changeset: 1002925:0298f67db2f0
user: martin <martin%NetBSD.org@localhost>
date: Wed Aug 21 08:03:22 2019 +0000
description:
Make this at least compile - I have no way to test.
diffstat:
sys/dev/spi/oj6sh.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 49358a44aa4a -r 0298f67db2f0 sys/dev/spi/oj6sh.c
--- a/sys/dev/spi/oj6sh.c Wed Aug 21 06:19:43 2019 +0000
+++ b/sys/dev/spi/oj6sh.c Wed Aug 21 08:03:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: oj6sh.c,v 1.4 2019/08/19 10:56:33 hkenken Exp $ */
+/* $NetBSD: oj6sh.c,v 1.5 2019/08/21 08:03:22 martin Exp $ */
/*
* Copyright (c) 2014 Genetec Corporation. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.4 2019/08/19 10:56:33 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.5 2019/08/21 08:03:22 martin Exp $");
#include "opt_oj6sh.h"
@@ -126,12 +126,17 @@
.disable = oj6sh_disable
};
+static const struct device_compatible_entry compat_data[] = {
+ { "oj6sh", 0 },
+ { NULL, 0 }
+};
+
static int
oj6sh_match(device_t parent, cfdata_t cf, void *aux)
{
struct spi_attach_args *sa = aux;
- if (strcmp(match->cf_name, "oj6sh"))
+ if (spi_compatible_match(sa, cf, compat_data) == 0)
return 0;
if (spi_configure(sa->sa_handle, SPI_MODE_0, 2500000))
return 0;
Home |
Main Index |
Thread Index |
Old Index