diff options
author | Rob Herring <robh@kernel.org> | 2023-03-30 00:03:36 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-04-04 14:11:03 +0200 |
commit | 2500763dd3db37fad94d9b506907c59c2f5e97c6 (patch) | |
tree | a4cd9241b504c57d5011764311a00c8062461f98 /arch/powerpc/sysdev | |
parent | powerpc/usbgecko: Use of_iomap() (diff) | |
download | linux-2500763dd3db37fad94d9b506907c59c2f5e97c6.tar.xz linux-2500763dd3db37fad94d9b506907c59c2f5e97c6.zip |
powerpc: Use of_address_to_resource()
Replace open coded reading of "reg" or of_get_address()/
of_translate_address() calls with a single call to
of_address_to_resource().
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230329220337.141295-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/tsi108_dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index bbccbe9f2b84..db520c40cb6f 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c @@ -45,9 +45,9 @@ phys_addr_t get_csrbase(void) tsi = of_find_node_by_type(NULL, "tsi-bridge"); if (tsi) { - unsigned int size; - const void *prop = of_get_property(tsi, "reg", &size); - tsi108_csr_base = of_translate_address(tsi, prop); + struct resource res; + of_address_to_resource(tsi, 0, &res); + tsi108_csr_base = res.start; of_node_put(tsi); } return tsi108_csr_base; |