]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: make i2c_bus_type const
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2023 15:22:43 +0000 (16:22 +0100)
committerWolfram Sang <wsa@kernel.org>
Thu, 18 Jan 2024 20:10:43 +0000 (21:10 +0100)
commit94959c0e796e41128483588d133b9a7003b409f9
treeae1f507d3f5736c9a688125e7d8a6c792f1178fa
parent614ef4d30fe724ff8558a74a1926bd3051d39b67
i2c: make i2c_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the i2c_bus_type variable to be a constant structure as well, placing
it into read-only memory which can not be modified at runtime.

Note, the sound/soc/rockchip/rk3399_gru_sound.c also needed tweaking as
it decided to save off a pointer to a bus type for internal stuff, and
it was using the i2c_bus_type as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h
sound/soc/rockchip/rk3399_gru_sound.c