diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-10 21:19:22 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-12 09:30:24 +0200 |
commit | 01893553e67c768985dc1531fa89fb04aa5134ce (patch) | |
tree | 5c4118b4601b431fb863c6c4185b425b2ace6b75 /sound/pci | |
parent | fd498bba7c5194cdfc3f0d726f99f0fa3b7e51de (diff) | |
download | linux-01893553e67c768985dc1531fa89fb04aa5134ce.tar.bz2 |
ALSA: hda/tegra: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610131922.134788-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_tegra.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 6f2b743b9d75..5aeef6123781 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -235,11 +235,9 @@ static int hda_tegra_init_chip(struct azx *chip, struct platform_device *pdev) { struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); struct hdac_bus *bus = azx_bus(chip); - struct device *dev = hda->dev; struct resource *res; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hda->regs = devm_ioremap_resource(dev, res); + hda->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(hda->regs)) return PTR_ERR(hda->regs); |