No need to use I2C_F_POLL here.

This commit is contained in:
thorpej 2019-12-23 18:20:02 +00:00
parent 5f3ac896d3
commit 8787caf98a
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunxi_hdmi.c,v 1.9 2019/12/23 00:24:02 thorpej Exp $ */
/* $NetBSD: sunxi_hdmi.c,v 1.10 2019/12/23 18:20:02 thorpej Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill@invisible.ca>
@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunxi_hdmi.c,v 1.9 2019/12/23 00:24:02 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunxi_hdmi.c,v 1.10 2019/12/23 18:20:02 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -637,14 +637,14 @@ sunxi_hdmi_read_edid_block(struct sunxi_hdmi_softc *sc, uint8_t *data,
uint8_t wbuf[2];
int error;
if ((error = iic_acquire_bus(tag, I2C_F_POLL)) != 0)
if ((error = iic_acquire_bus(tag, 0)) != 0)
return error;
wbuf[0] = block; /* start address */
error = iic_exec(tag, I2C_OP_READ_WITH_STOP, DDC_ADDR, wbuf, 1,
data, EDID_BLOCK_SIZE, I2C_F_POLL);
iic_release_bus(tag, I2C_F_POLL);
data, EDID_BLOCK_SIZE, 0);
iic_release_bus(tag, 0);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: i2c.c,v 1.71 2019/12/22 23:23:32 thorpej Exp $ */
/* $NetBSD: i2c.c,v 1.72 2019/12/23 18:27:11 thorpej Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.71 2019/12/22 23:23:32 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.72 2019/12/23 18:27:11 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -353,7 +353,7 @@ iic_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
* to see if it looks like something is really there.
*/
if (match_result == I2C_MATCH_ADDRESS_ONLY &&
(error = (*probe_func)(sc, &ia, I2C_F_POLL)) != 0)
(error = (*probe_func)(sc, &ia, 0)) != 0)
continue;
sc->sc_devices[ia.ia_addr] =