]> www.infradead.org Git - users/jedix/linux-maple.git/commit
USB: gadget: f_hid: make hidg_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 09:44:17 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jun 2023 14:20:48 +0000 (16:20 +0200)
commit99f2d956e1fa3ead355cde4fd1a914e54cfe0a40
tree338cb298921f99ad9c29948e1ae192e0431e492f
parent2c10e7a049dad73503da41c7754add91cb7b35d9
USB: gadget: f_hid: make hidg_class a static const structure

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