i2c: constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Mon, 19 Feb 2024 12:38:47 +0000 (09:38 -0300)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 4 Mar 2024 13:28:25 +0000 (14:28 +0100)
commiteb52034436a58e742ceea0dcf2f003f83a3449a5
tree1bf6a4332c0f3274b800a9e2cab7d389c688f56a
parentb401b621758e46812da61fa58a67c3fd8d91de0d
i2c: constify the struct device_type usage

Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
i2c_adapter_type and i2c_client_type variables to be constant structures as
well, placing it into read-only memory which can not be modified at
runtime.

Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h