static void pcm1796_write(struct oxygen *chip, unsigned int codec, u8 reg, u8 value) { if ((chip->model.function_flags & OXYGEN_FUNCTION_2WIRE_SPI_MASK) == OXYGEN_FUNCTION_SPI) pcm1796_write_spi(chip, codec, reg, value); else pcm1796_write_i2c(chip, codec, reg, value); }
static void pcm1796_write(struct oxygen *chip, unsigned int codec, u8 reg, u8 value) { struct xonar_pcm179x *data = chip->model_data; if ((chip->model.function_flags & OXYGEN_FUNCTION_2WIRE_SPI_MASK) == OXYGEN_FUNCTION_SPI) pcm1796_write_spi(chip, codec, reg, value); else pcm1796_write_i2c(chip, codec, reg, value); if ((unsigned int)(reg - PCM1796_REG_BASE) < ARRAY_SIZE(data->pcm1796_regs[codec])) data->pcm1796_regs[codec][reg - PCM1796_REG_BASE] = value; }