Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: txx9: add back the hack for a too small resource_size_t

Looks like I misread the Kconfig magic and this driver can be compiled
into 32-bit kernels. Add back the hack to extent the range of the
resource_size_t, and include the header with the txx9-specific ioremap
magic for that.

Fixes: acfaaf52ebfd ("ASoC: txx9: don't work around too small resource_size_t")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Christoph Hellwig and committed by
Thomas Bogendoerfer
6abf4a2f 269b3a9a

+5 -2
+5 -2
sound/soc/txx9/txx9aclc-ac97.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/io.h> 16 16 #include <linux/gfp.h> 17 + #include <asm/mach-tx39xx/ioremap.h> /* for TXX9_DIRECTMAP_BASE */ 17 18 #include <sound/core.h> 18 19 #include <sound/pcm.h> 19 20 #include <sound/soc.h> ··· 176 175 int err; 177 176 int irq; 178 177 179 - BUILD_BUG_ON(sizeof(drvdata->physbase) > sizeof(r->start)); 180 - 181 178 irq = platform_get_irq(pdev, 0); 182 179 if (irq < 0) 183 180 return irq; ··· 191 192 192 193 platform_set_drvdata(pdev, drvdata); 193 194 drvdata->physbase = r->start; 195 + if (sizeof(drvdata->physbase) > sizeof(r->start) && 196 + r->start >= TXX9_DIRECTMAP_BASE && 197 + r->start < TXX9_DIRECTMAP_BASE + 0x400000) 198 + drvdata->physbase |= 0xf00000000ull; 194 199 err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq, 195 200 0, dev_name(&pdev->dev), drvdata); 196 201 if (err < 0)