[alsa-devel] sound/pci/hda/hda_tegra.c

Eliot Blennerhassett eliot at blennerhassett.gen.nz
Fri Feb 13 05:11:49 CET 2015


Browsing code I came across this...

sound/pci/hda/hda_tegra.c

static int hda_tegra_init_chip(struct azx *chip, struct platform_device
*pdev)
...

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	hda->regs = devm_ioremap_resource(dev, res);

Checking chip->remap_addr before assignment looks wierd to me, am I
missing something?  Should it be 'hda->regs' here?

	if (IS_ERR(chip->remap_addr))
		return PTR_ERR(chip->remap_addr);

	chip->remap_addr = hda->regs + HDA_BAR0;
	chip->addr = res->start + HDA_BAR0;
	



More information about the Alsa-devel mailing list