USB: roles: make role_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 09:44:13 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jun 2023 14:20:40 +0000 (16:20 +0200)
commit044a61158b9e00ee4b69bc4fa0f3e720b5dd669a
tree33cb33b40d0e01a8c8619ff9afb3275c5fc36e7b
parent34d401a1910dde53356fa5ac03649085fd20e5e3
USB: roles: make role_class a static const structure

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

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230620094412.508580-7-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/roles/class.c