i2c: dev: make i2c_dev_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Thu, 10 Aug 2023 17:46:18 +0000 (21:46 +0400)
committerWolfram Sang <wsa@kernel.org>
Tue, 19 Sep 2023 20:09:58 +0000 (22:09 +0200)
commitcdb55bdb50eb1a458ad8f34550304296c39690f3
tree43537550ae8caee78b87eeae241d2c96b293734e
parentbcfaaa9711127eda1803f164ae4d790f38ff1122
i2c: dev: make i2c_dev_class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, move the i2c_dev_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-dev.c