summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/suspend.c
diff options
context:
space:
mode:
authorMinghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>2022-02-25 01:07:37 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2022-05-22 15:58:31 +1000
commit8a57c3cc2bcb8df98c239d6804fd01834960b7d2 (patch)
treeeff75232a805b650a7cfb16de74f3607f30a6513 /arch/powerpc/platforms/83xx/suspend.c
parent3def164a5cedad9117859dd4610cae2cc59cb6d2 (diff)
powerpc/platforms/83xx: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220225010737.2038781-1-chi.minghao@zte.com.cn
Diffstat (limited to 'arch/powerpc/platforms/83xx/suspend.c')
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index bb147d34d4a6..6d47a5b81485 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -322,18 +322,15 @@ static const struct platform_suspend_ops mpc83xx_suspend_ops = {
static const struct of_device_id pmc_match[];
static int pmc_probe(struct platform_device *ofdev)
{
- const struct of_device_id *match;
struct device_node *np = ofdev->dev.of_node;
struct resource res;
const struct pmc_type *type;
int ret = 0;
- match = of_match_device(pmc_match, &ofdev->dev);
- if (!match)
+ type = of_device_get_match_data(&ofdev->dev);
+ if (!type)
return -EINVAL;
- type = match->data;
-
if (!of_device_is_available(np))
return -ENODEV;