net: wwan: core: make wwan_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Sat, 2 Mar 2024 17:06:01 +0000 (14:06 -0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 19:21:18 +0000 (11:21 -0800)
commit070bef83f03ea9d91a8011f18113f8967e3df5bf
tree0b7c30a173fd6808cd721029c10bee6d43c0c5a9
parentd9567f212b15c2bb2220ca59b3103c752765dded
net: wwan: core: make wwan_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the wwan_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: Ricardo B. Marliere <ricardo@marliere.net>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://lore.kernel.org/r/20240302-class_cleanup-net-next-v1-5-8fa378595b93@marliere.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/wwan_core.c