mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data
const struct of_device_id incorrectly assigned "match->data" using
of_device_get_match_data()
Instead assign `const struct tegra30_ahub_soc_data *soc_data` with
const void *of_device_get_match_data(...)
Fixes: 80165bb804
("ASoC: tegra30: ahub: Use of_device_get_match_data")
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Link: https://lore.kernel.org/r/bb61c41f2ee0cf0d85fecdfea05f23a7205992e6.1629148177.git.aakashhemadri123@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d40dfb860a
commit
ea2efedefb
1 changed files with 2 additions and 4 deletions
|
@ -512,16 +512,14 @@ static const struct of_device_id tegra30_ahub_of_match[] = {
|
||||||
|
|
||||||
static int tegra30_ahub_probe(struct platform_device *pdev)
|
static int tegra30_ahub_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
const struct of_device_id *match;
|
|
||||||
const struct tegra30_ahub_soc_data *soc_data;
|
const struct tegra30_ahub_soc_data *soc_data;
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
void __iomem *regs_apbif, *regs_ahub;
|
void __iomem *regs_apbif, *regs_ahub;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
match = of_device_get_match_data(&pdev->dev);
|
soc_data = of_device_get_match_data(&pdev->dev);
|
||||||
if (!match)
|
if (!soc_data)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
soc_data = match->data;
|
|
||||||
|
|
||||||
ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub),
|
ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in a new issue