/* Returns unsigned register value on success, -errno on failure.  */
static int read_ad1843_reg(void *priv, int reg)
/* Returns unsigned register value on success, -errno on failure.  */
static int read_ad1843_reg(void *priv, int reg)
{
	struct snd_sgio2audio *chip = priv;
	int val;
	unsigned long flags;
	spin_lock_irqsave(&chip->ad1843_lock, flags);
	writeq((reg << CODEC_CONTROL_ADDRESS_SHIFT) |
	       CODEC_CONTROL_READ, &mace->perif.audio.codec_control);
	wmb();
	val = readq(&mace->perif.audio.codec_control);
	udelay(200);
	val = readq(&mace->perif.audio.codec_read);
	spin_unlock_irqrestore(&chip->ad1843_lock, flags);
	return val;
}