Skip to content

Commit 02fb298

Browse files
Sylwester Nawrockikrzk
authored andcommitted
soc: samsung: chipid: Drop "syscon" compatible requirement
As we dropped the requirement of "syscon" compatible in the chipid nodes rework code acquiring the regmap to use device_node_to_regmap() rather than syscon_node_to_regmap(). Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
1 parent 5ea4285 commit 02fb298

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎drivers/soc/samsung/exynos-chipid.c‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,20 @@ static int __init exynos_chipid_early_init(void)
5050
struct soc_device_attribute *soc_dev_attr;
5151
struct soc_device *soc_dev;
5252
struct device_node *root;
53+
struct device_node *syscon;
5354
struct regmap *regmap;
5455
u32 product_id;
5556
u32 revision;
5657
int ret;
5758

58-
regmap = syscon_regmap_lookup_by_compatible("samsung,exynos4210-chipid");
59+
syscon = of_find_compatible_node(NULL, NULL,
60+
"samsung,exynos4210-chipid");
61+
if (!syscon)
62+
return ENODEV;
63+
64+
regmap = device_node_to_regmap(syscon);
65+
of_node_put(syscon);
66+
5967
if (IS_ERR(regmap))
6068
return PTR_ERR(regmap);
6169

0 commit comments

Comments
 (0)