aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/sata_svw.c
diff options
context:
space:
mode:
authorGravatar Rob Herring <robh@kernel.org> 2023-06-09 12:31:25 -0600
committerGravatar Damien Le Moal <dlemoal@kernel.org> 2023-06-13 15:38:48 +0900
commitd0b2461678b12c08d43eaf6740485e2f2c3aeac6 (patch)
tree2d0b38c67da8477c58636f8d024086b440c8ffa8 /drivers/ata/sata_svw.c
parentata: libata-scsi: Use ata_ncq_supported in ata_scsi_dev_config() (diff)
downloadlinux-d0b2461678b12c08d43eaf6740485e2f2c3aeac6.tar.gz
linux-d0b2461678b12c08d43eaf6740485e2f2c3aeac6.tar.bz2
linux-d0b2461678b12c08d43eaf6740485e2f2c3aeac6.zip
ata: Use of_property_read_reg() to parse "reg"
Use the recently added of_property_read_reg() helper to get the untranslated "reg" address value. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers/ata/sata_svw.c')
-rw-r--r--drivers/ata/sata_svw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index c47c3fb434d5..598a872f6a08 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -32,6 +32,7 @@
#include <scsi/scsi.h>
#include <linux/libata.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#define DRV_NAME "sata_svw"
#define DRV_VERSION "2.3"
@@ -319,10 +320,11 @@ static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost)
/* Match it to a port node */
index = (ap == ap->host->ports[0]) ? 0 : 1;
for (np = np->child; np != NULL; np = np->sibling) {
- const u32 *reg = of_get_property(np, "reg", NULL);
- if (!reg)
+ u64 reg;
+
+ if (of_property_read_reg(np, 0, &reg, NULL))
continue;
- if (index == *reg) {
+ if (index == reg) {
seq_printf(m, "devspec: %pOF\n", np);
break;
}