net: ppp: make ppp_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Sat, 2 Mar 2024 17:05:59 +0000 (14:05 -0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 19:21:18 +0000 (11:21 -0800)
commit2ad2018aa3572a82079b423f61680353bed2af60
tree4595e6f6417625eb1302fb37966d7e48b5a56b09
parent63767a76318c4e2b8321b9eed728ba18020aaccf
net: ppp: make ppp_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 ppp_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>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240302-class_cleanup-net-next-v1-3-8fa378595b93@marliere.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ppp/ppp_generic.c