Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-i2c-spi-conf]: src/sys/dev/i2c No need to device_set_handle(); i...
details: https://anonhg.NetBSD.org/src/rev/e8a69d8d6655
branches: thorpej-i2c-spi-conf
changeset: 1020807:e8a69d8d6655
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri May 14 03:57:51 2021 +0000
description:
No need to device_set_handle(); it's done for us by the i2c enumeration
code.
diffstat:
sys/dev/i2c/pcai2cmux.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r c829b2bf3c74 -r e8a69d8d6655 sys/dev/i2c/pcai2cmux.c
--- a/sys/dev/i2c/pcai2cmux.c Fri May 14 03:11:49 2021 +0000
+++ b/sys/dev/i2c/pcai2cmux.c Fri May 14 03:57:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcai2cmux.c,v 1.8.4.2 2021/05/09 23:26:53 thorpej Exp $ */
+/* $NetBSD: pcai2cmux.c,v 1.8.4.3 2021/05/14 03:57:51 thorpej Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcai2cmux.c,v 1.8.4.2 2021/05/09 23:26:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcai2cmux.c,v 1.8.4.3 2021/05/14 03:57:51 thorpej Exp $");
/*
* Driver for NXP PCA954x / PCA984x I2C switches and multiplexers.
@@ -334,11 +334,8 @@
{
struct pcaiicmux_softc * const sc = device_private(self);
struct i2c_attach_args * const ia = aux;
- devhandle_t devhandle = ia->ia_devhandle;
int error;
- device_set_handle(self, devhandle);
-
sc->sc_iicmux.sc_dev = self;
sc->sc_iicmux.sc_config = &pcaiicmux_config;
sc->sc_iicmux.sc_i2c_parent = ia->ia_tag;
@@ -352,6 +349,7 @@
sc->sc_type->enable_bit ? "mux" : "switch");
#if defined(I2CMUX_USE_FDT)
+ devhandle_t devhandle = device_handle(self);
if (devhandle_type(devhandle) == DEVHANDLE_TYPE_OF) {
const int phandle = devhandle_to_of(devhandle);
if (of_hasprop(phandle, "i2c-mux-idle-disconnect")) {
Home |
Main Index |
Thread Index |
Old Index