OSDN Git Service

ppdev: make ppdev_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 14:37:57 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2023 08:27:17 +0000 (10:27 +0200)
commit98ab58a7a0b08be3f5ebdcb44fdf49127f749970
tree10e0ef7b43bd01379deefdbcb89b6f7a57bab1da
parenteafd52e6971ab63dd9294df1e363951148f292cf
ppdev: make ppdev_class a static const structure

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

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230620143751.578239-15-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ppdev.c