OSDN Git Service

bsg: make bsg_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 18:01:33 +0000 (20:01 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jun 2023 13:46:17 +0000 (07:46 -0600)
commit72ef02b8dfa009029fa713e8a731a92d27d14e35
treebc018aea12760ae41393a634a081765010ca76e5
parent2eefd399d28a52739fdbeebe84775275f016171c
bsg: make bsg_class a static const structure

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

Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-scsi@vger.kernel.org
Cc: linux-block@vger.kernel.org
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230620180129.645646-8-gregkh@linuxfoundation.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bsg.c