summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-11-17 19:39:32 +0800
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-01-23 11:48:31 +0100
commitbbaf6624f23d6e538401382be97ba3d4bcba963e (patch)
tree4f1c49c3a0c1e77ebc1ca15c842ad2bb0a3bafc4 /drivers/memory
parent27e5f98c30d73cdb8c8baeaf7d0af19af5266d3a (diff)
downloadlinux-stable-bbaf6624f23d6e538401382be97ba3d4bcba963e.tar.gz
linux-stable-bbaf6624f23d6e538401382be97ba3d4bcba963e.tar.bz2
linux-stable-bbaf6624f23d6e538401382be97ba3d4bcba963e.zip
memory: ti-emif-pm: Use device_get_match_data() to simplify the code
Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202211171939327684154@zte.com.cn Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/ti-emif-pm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
index 31d6266f008c..cef0d3beb63b 100644
--- a/drivers/memory/ti-emif-pm.c
+++ b/drivers/memory/ti-emif-pm.c
@@ -277,18 +277,13 @@ static int ti_emif_probe(struct platform_device *pdev)
int ret;
struct resource *res;
struct device *dev = &pdev->dev;
- const struct of_device_id *match;
struct ti_emif_data *emif_data;
emif_data = devm_kzalloc(dev, sizeof(*emif_data), GFP_KERNEL);
if (!emif_data)
return -ENOMEM;
- match = of_match_device(ti_emif_of_match, &pdev->dev);
- if (!match)
- return -ENODEV;
-
- emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data;
+ emif_data->pm_data.ti_emif_sram_config = (unsigned long) device_get_match_data(&pdev->dev);
emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev,
0,