No need to use I2C_F_POLL here.
This commit is contained in:
parent
8a538e103e
commit
23300298e3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: coram.c,v 1.17 2019/12/22 23:23:32 thorpej Exp $ */
|
||||
/* $NetBSD: coram.c,v 1.18 2019/12/23 15:31:31 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.17 2019/12/22 23:23:32 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.18 2019/12/23 15:31:31 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -247,10 +247,10 @@ coram_attach(device_t parent, device_t self, void *aux)
|
|||
bar = 0;
|
||||
// seeprom_bootstrap_read(&sc->sc_i2c, 0x50, 0, 256, foo, 256);
|
||||
|
||||
iic_acquire_bus(&sc->sc_i2c, I2C_F_POLL);
|
||||
iic_acquire_bus(&sc->sc_i2c, 0);
|
||||
iic_exec(&sc->sc_i2c, I2C_OP_READ_WITH_STOP, 0x50, &bar, 1, foo, 256,
|
||||
I2C_F_POLL);
|
||||
iic_release_bus(&sc->sc_i2c, I2C_F_POLL);
|
||||
0);
|
||||
iic_release_bus(&sc->sc_i2c, 0);
|
||||
|
||||
printf("\n");
|
||||
for ( i = 0; i < 256; i++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cxdtv.c,v 1.17 2019/12/22 23:23:32 thorpej Exp $ */
|
||||
/* $NetBSD: cxdtv.c,v 1.18 2019/12/23 15:32:29 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.17 2019/12/22 23:23:32 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.18 2019/12/23 15:32:29 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -1084,13 +1084,13 @@ cxdtv_card_init_hdtvwonder(struct cxdtv_softc *sc)
|
|||
na = 0x0a; /* Nxt2004 address */
|
||||
x = 0;
|
||||
|
||||
iic_acquire_bus(&sc->sc_i2c, I2C_F_POLL);
|
||||
iic_acquire_bus(&sc->sc_i2c, 0);
|
||||
|
||||
for(i = 0; i < 5; i++)
|
||||
x |= iic_exec(&sc->sc_i2c, I2C_OP_WRITE_WITH_STOP, na,
|
||||
nb[i], 2, NULL, 0, I2C_F_POLL);
|
||||
nb[i], 2, NULL, 0, 0);
|
||||
|
||||
iic_release_bus(&sc->sc_i2c, I2C_F_POLL);
|
||||
iic_release_bus(&sc->sc_i2c, 0);
|
||||
|
||||
if (x)
|
||||
aprint_error_dev(sc->sc_dev, "HDTV Wonder tuner init failed");
|
||||
|
|
Loading…
Reference in New Issue