forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/soc/dove/pmu.c
....@@ -383,7 +383,7 @@
383383
384384 domains_node = of_get_child_by_name(np_pmu, "domains");
385385 if (!domains_node) {
386
- pr_err("%s: failed to find domains sub-node\n", np_pmu->name);
386
+ pr_err("%pOFn: failed to find domains sub-node\n", np_pmu);
387387 return 0;
388388 }
389389
....@@ -396,7 +396,7 @@
396396 pmu->pmc_base = of_iomap(pmu->of_node, 0);
397397 pmu->pmu_base = of_iomap(pmu->of_node, 1);
398398 if (!pmu->pmc_base || !pmu->pmu_base) {
399
- pr_err("%s: failed to map PMU\n", np_pmu->name);
399
+ pr_err("%pOFn: failed to map PMU\n", np_pmu);
400400 iounmap(pmu->pmu_base);
401401 iounmap(pmu->pmc_base);
402402 kfree(pmu);
....@@ -414,7 +414,7 @@
414414 break;
415415
416416 domain->pmu = pmu;
417
- domain->base.name = kstrdup(np->name, GFP_KERNEL);
417
+ domain->base.name = kasprintf(GFP_KERNEL, "%pOFn", np);
418418 if (!domain->base.name) {
419419 kfree(domain);
420420 break;
....@@ -444,7 +444,7 @@
444444 /* Loss of the interrupt controller is not a fatal error. */
445445 parent_irq = irq_of_parse_and_map(pmu->of_node, 0);
446446 if (!parent_irq) {
447
- pr_err("%s: no interrupt specified\n", np_pmu->name);
447
+ pr_err("%pOFn: no interrupt specified\n", np_pmu);
448448 } else {
449449 ret = dove_init_pmu_irq(pmu, parent_irq);
450450 if (ret)