diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2024-07-30 21:58:49 -0700 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2024-08-24 13:02:39 +0530 |
| commit | 1bbda9b26fd4246c76beceeabe9893acea9e3ee9 (patch) | |
| tree | f24498a0d2c3d118064e9ae7a053479061abe0fe /include | |
| parent | 7df1c8126fd1027af0c9b09ea806e1f50d8a0785 (diff) | |
| download | opensbi-1bbda9b26fd4246c76beceeabe9893acea9e3ee9.zip opensbi-1bbda9b26fd4246c76beceeabe9893acea9e3ee9.tar.gz opensbi-1bbda9b26fd4246c76beceeabe9893acea9e3ee9.tar.bz2 | |
lib: utils/regmap: Constify FDT pointers in parsing functions
Indicate that none of these functions modify the devicetree by
constifying the parameter type.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi_utils/regmap/fdt_regmap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sbi_utils/regmap/fdt_regmap.h b/include/sbi_utils/regmap/fdt_regmap.h index 403dd7d..86e7244 100644 --- a/include/sbi_utils/regmap/fdt_regmap.h +++ b/include/sbi_utils/regmap/fdt_regmap.h @@ -17,15 +17,15 @@ struct fdt_phandle_args; /** FDT based regmap driver */ struct fdt_regmap { const struct fdt_match *match_table; - int (*init)(void *fdt, int nodeoff, u32 phandle, + int (*init)(const void *fdt, int nodeoff, u32 phandle, const struct fdt_match *match); }; /** Get regmap instance based on phandle */ -int fdt_regmap_get_by_phandle(void *fdt, u32 phandle, +int fdt_regmap_get_by_phandle(const void *fdt, u32 phandle, struct regmap **out_rmap); /** Get regmap instance based on "regmap" property of the specified DT node */ -int fdt_regmap_get(void *fdt, int nodeoff, struct regmap **out_rmap); +int fdt_regmap_get(const void *fdt, int nodeoff, struct regmap **out_rmap); #endif |
