diff options
| author | Heiner Kallweit <hkallweit1@gmail.com> | 2025-09-14 22:24:13 +0200 |
|---|---|---|
| committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-09-25 23:14:50 +0200 |
| commit | 1a2b423be6a89dd07d5fc27ea042be68697a6a49 (patch) | |
| tree | e6351b546943e9217c5b6d89eaf6ab62d9203706 /include/linux | |
| parent | 54d6a978bb2bb78a781bc849608c5b4f0748985b (diff) | |
i2c: boardinfo: Annotate code used in init phase only
Annotate two places in boardinfo code:
- __i2c_first_dynamic_bus_num is set in init phase. Annotate it as
__ro_after_init to prevent later changes.
- i2c_register_board_info() is used in init phase only, so annotate it
as __init, allowing to free the memory after init phase.
This is safe, see comment: "done in board-specific init code near
arch_initcall() time"
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 20fd41b51d5c..11a19241e360 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -499,7 +499,7 @@ static inline struct i2c_client *i2c_verify_client(struct device *dev) * Modules for add-on boards must use other calls. */ #ifdef CONFIG_I2C_BOARDINFO -int +int __init i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n); #else |
