diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2024-07-30 21:58:46 -0700 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2024-08-24 13:02:28 +0530 |
| commit | 039e810437d3fbf96505454cce17c8f90e51996d (patch) | |
| tree | 47f997357b2f2faabb8549cfaa19496f82c1f138 /include | |
| parent | c585354380b134b1552e30946a7cc95c2f0a3a95 (diff) | |
| download | opensbi-039e810437d3fbf96505454cce17c8f90e51996d.tar.gz opensbi-039e810437d3fbf96505454cce17c8f90e51996d.tar.bz2 opensbi-039e810437d3fbf96505454cce17c8f90e51996d.zip | |
lib: utils/i2c: 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/i2c/fdt_i2c.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sbi_utils/i2c/fdt_i2c.h b/include/sbi_utils/i2c/fdt_i2c.h index c6e33399..65758ec2 100644 --- a/include/sbi_utils/i2c/fdt_i2c.h +++ b/include/sbi_utils/i2c/fdt_i2c.h @@ -15,12 +15,12 @@ /** FDT based I2C adapter driver */ struct fdt_i2c_adapter { const struct fdt_match *match_table; - int (*init)(void *fdt, int nodeoff, + int (*init)(const void *fdt, int nodeoff, const struct fdt_match *match); }; /** Get I2C adapter identified by nodeoff */ -int fdt_i2c_adapter_get(void *fdt, int nodeoff, +int fdt_i2c_adapter_get(const void *fdt, int nodeoff, struct i2c_adapter **out_adapter); #endif |
