Skip to contentSkip to conversation

sound/pci/hda/hda_tegra.c

DISCUSSION Eliot Blennerhassett 2 participants 2 messages Feb 13, 2015

lore
Share & tools
lore
#0 lore raw

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;
#1 lore raw

At Fri, 13 Feb 2015 17:11:49 +1300,

Quoted 12 lines · Eliot Blennerhassett

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);
Quoted 8 lines

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;

Yeah, care to send a fix patch?

thanks,

Takashi