Module Name: src
Committed By: thorpej
Date: Fri May 14 03:57:52 UTC 2021
Modified Files:
src/sys/dev/i2c [thorpej-i2c-spi-conf]: pcai2cmux.c
Log Message:
No need to device_set_handle(); it's done for us by the i2c enumeration
code.
To generate a diff of this commit:
cvs rdiff -u -r1.8.4.2 -r1.8.4.3 src/sys/dev/i2c/pcai2cmux.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/dev/i2c/pcai2cmux.c
diff -u src/sys/dev/i2c/pcai2cmux.c:1.8.4.2 src/sys/dev/i2c/pcai2cmux.c:1.8.4.3
--- src/sys/dev/i2c/pcai2cmux.c:1.8.4.2 Sun May 9 23:26:53 2021
+++ src/sys/dev/i2c/pcai2cmux.c Fri May 14 03:57:51 2021
@@ -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 @@ pcaiicmux_attach(device_t parent, device
{
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 @@ pcaiicmux_attach(device_t parent, device
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")) {