Commit acfaaf52 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Thomas Bogendoerfer

ASoC: txx9: don't work around too small resource_size_t

The txx9 sound driver deends on HAS_TXX9_ACLC, which is only set for
three tx49xx SOCs, and thus always has a 64-bit phys_addr_t and
resource_size_t.  Instead of poking into ioremap internals to work
around a potentially too small resource_size_t just add a BUILD_BUG_ON
to catch such a case.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 9446aa50
...@@ -175,6 +175,8 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev) ...@@ -175,6 +175,8 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
int err; int err;
int irq; int irq;
BUILD_BUG_ON(sizeof(drvdata->physbase) > sizeof(r->start));
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) if (irq < 0)
return irq; return irq;
...@@ -190,10 +192,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev) ...@@ -190,10 +192,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drvdata); platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start; drvdata->physbase = r->start;
if (sizeof(drvdata->physbase) > sizeof(r->start) &&
r->start >= TXX9_DIRECTMAP_BASE &&
r->start < TXX9_DIRECTMAP_BASE + 0x400000)
drvdata->physbase |= 0xf00000000ull;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq, err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
0, dev_name(&pdev->dev), drvdata); 0, dev_name(&pdev->dev), drvdata);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment