Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Revert part of previous - do not reserve regulat...
details: https://anonhg.NetBSD.org/src/rev/52ab0b8d06f9
branches: trunk
changeset: 447167:52ab0b8d06f9
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jan 02 18:38:03 2019 +0000
description:
Revert part of previous - do not reserve regulators, it's perfectly normal for devices to share one.
diffstat:
sys/dev/i2c/axppmic.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diffs (53 lines):
diff -r 1fb5a110d5de -r 52ab0b8d06f9 sys/dev/i2c/axppmic.c
--- a/sys/dev/i2c/axppmic.c Wed Jan 02 17:34:03 2019 +0000
+++ b/sys/dev/i2c/axppmic.c Wed Jan 02 18:38:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: axppmic.c,v 1.17 2019/01/02 17:28:55 jmcneill Exp $ */
+/* $NetBSD: axppmic.c,v 1.18 2019/01/02 18:38:03 jmcneill Exp $ */
/*-
* Copyright (c) 2014-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,13 +27,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.17 2019/01/02 17:28:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.18 2019/01/02 18:38:03 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
-#include <sys/atomic.h>
#include <sys/conf.h>
#include <sys/bus.h>
#include <sys/kmem.h>
@@ -310,7 +309,6 @@
i2c_tag_t sc_i2c;
i2c_addr_t sc_addr;
const struct axppmic_ctrl *sc_ctrl;
- u_int sc_inuse;
};
struct axpreg_attach_args {
@@ -880,20 +878,12 @@
static int
axpreg_acquire(device_t dev)
{
- struct axpreg_softc *sc = device_private(dev);
-
- if (atomic_cas_uint(&sc->sc_inuse, 0, 1) != 0)
- return EBUSY;
-
return 0;
}
static void
axpreg_release(device_t dev)
{
- struct axpreg_softc *sc = device_private(dev);
-
- atomic_swap_uint(&sc->sc_inuse, 0);
}
static int
Home |
Main Index |
Thread Index |
Old Index