diff options
author | Rob Herring <robh@kernel.org> | 2023-06-09 20:31:25 +0200 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-06-13 08:38:48 +0200 |
commit | d0b2461678b12c08d43eaf6740485e2f2c3aeac6 (patch) | |
tree | 2d0b38c67da8477c58636f8d024086b440c8ffa8 /drivers/ata/sata_svw.c | |
parent | ata: libata-scsi: Use ata_ncq_supported in ata_scsi_dev_config() (diff) | |
download | linux-d0b2461678b12c08d43eaf6740485e2f2c3aeac6.tar.xz 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.c | 8 |
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, ®, NULL)) continue; - if (index == *reg) { + if (index == reg) { seq_printf(m, "devspec: %pOF\n", np); break; } |