USB: gadget: udc: core: make udc_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 09:44:14 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jun 2023 14:20:43 +0000 (16:20 +0200)
commit8e99143649ad4838d58aeac9da43a5726b841366
tree172f9ebdd3cec2168255c6a4cb0fbcfdac6235c2
parent044a61158b9e00ee4b69bc4fa0f3e720b5dd669a
USB: gadget: udc: core: make udc_class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, move the udc_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-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c