From: Krzysztof Kozlowski Date: Fri, 16 Apr 2021 12:23:09 +0000 (+0200) Subject: crypto: s5p-sss - simplify getting of_device_id match data X-Git-Tag: v5.13-rc1~200^2~5 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6b238db737014f192da5d48d22a7a94b3e5d7b57;p=linux-platform-drivers-x86.git crypto: s5p-sss - simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 8ed08130196f..d613bd557016 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -424,13 +425,9 @@ MODULE_DEVICE_TABLE(of, s5p_sss_dt_match); static inline const struct samsung_aes_variant *find_s5p_sss_version (const struct platform_device *pdev) { - if (IS_ENABLED(CONFIG_OF) && (pdev->dev.of_node)) { - const struct of_device_id *match; + if (IS_ENABLED(CONFIG_OF) && (pdev->dev.of_node)) + return of_device_get_match_data(&pdev->dev); - match = of_match_node(s5p_sss_dt_match, - pdev->dev.of_node); - return (const struct samsung_aes_variant *)match->data; - } return (const struct samsung_aes_variant *) platform_get_device_id(pdev)->driver_data; }