mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
a10b3841f9
Eliminate sparse warnings in soc/rockchip/dtpm.c:
drivers/soc/rockchip/dtpm.c:15:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:17:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:20:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:23:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:26:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:29:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:32:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:35:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:38:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:41:12: sparse: warning: obsolete array initializer, use C99 syntax
Fixes: b9d6c47a2b
("rockchip/soc/drivers: Add DTPM description for rk3399")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230501024950.31518-1-rdunlap@infradead.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
66 lines
1.7 KiB
C
66 lines
1.7 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright 2021 Linaro Limited
|
|
*
|
|
* Author: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
*
|
|
* DTPM hierarchy description
|
|
*/
|
|
#include <linux/dtpm.h>
|
|
#include <linux/module.h>
|
|
#include <linux/of.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
static struct dtpm_node __initdata rk3399_hierarchy[] = {
|
|
[0] = { .name = "rk3399",
|
|
.type = DTPM_NODE_VIRTUAL },
|
|
[1] = { .name = "package",
|
|
.type = DTPM_NODE_VIRTUAL,
|
|
.parent = &rk3399_hierarchy[0] },
|
|
[2] = { .name = "/cpus/cpu@0",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[3] = { .name = "/cpus/cpu@1",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[4] = { .name = "/cpus/cpu@2",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[5] = { .name = "/cpus/cpu@3",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[6] = { .name = "/cpus/cpu@100",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[7] = { .name = "/cpus/cpu@101",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[8] = { .name = "/gpu@ff9a0000",
|
|
.type = DTPM_NODE_DT,
|
|
.parent = &rk3399_hierarchy[1] },
|
|
[9] = { /* sentinel */ }
|
|
};
|
|
|
|
static struct of_device_id __initdata rockchip_dtpm_match_table[] = {
|
|
{ .compatible = "rockchip,rk3399", .data = rk3399_hierarchy },
|
|
{},
|
|
};
|
|
|
|
static int __init rockchip_dtpm_init(void)
|
|
{
|
|
return dtpm_create_hierarchy(rockchip_dtpm_match_table);
|
|
}
|
|
module_init(rockchip_dtpm_init);
|
|
|
|
static void __exit rockchip_dtpm_exit(void)
|
|
{
|
|
return dtpm_destroy_hierarchy();
|
|
}
|
|
module_exit(rockchip_dtpm_exit);
|
|
|
|
MODULE_SOFTDEP("pre: panfrost cpufreq-dt");
|
|
MODULE_DESCRIPTION("Rockchip DTPM driver");
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_ALIAS("platform:dtpm");
|
|
MODULE_AUTHOR("Daniel Lezcano <daniel.lezcano@kernel.org");
|