]> git.ipfire.org Git - thirdparty/linux.git/commit
nfc: core: make nfc_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Sat, 2 Mar 2024 17:06:02 +0000 (14:06 -0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 19:21:18 +0000 (11:21 -0800)
commite5560011692981bc8bfeae7fc0673c65a02badba
treecd04c9f66b685134b85b2f127b59cf742c479a97
parent070bef83f03ea9d91a8011f18113f8967e3df5bf
nfc: core: make nfc_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 nfc_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-6-8fa378595b93@marliere.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/nfc/nfc.h
net/nfc/core.c