]> git.baikalelectronics.ru Git - kernel.git/commit
target: simplify backend driver registration
authorChristoph Hellwig <hch@lst.de>
Sun, 10 May 2015 16:14:56 +0000 (18:14 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 1 Jun 2015 07:25:34 +0000 (00:25 -0700)
commit44acc191b1aea32be543f7b9518c5122f2574344
tree38dda3f7dc5e049761c80b55796e48cacbb6924c
parent65646dbffe405ebb6c87502153a4d5a47a119ae5
target: simplify backend driver registration

Rewrite the backend driver registration based on what we did to the fabric
drivers:  introduce a read-only struct target_bakckend_ops that the driver
registers, which is then instanciate as a struct target_backend by the
core.  This allows the ops vector to be smaller and allows us to mark it
const.  At the same time the registration function can set up the
configfs attributes, avoiding the need to add additional boilerplate code
for that to the drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_configfs.c
drivers/target/target_core_device.c
drivers/target/target_core_file.c
drivers/target/target_core_hba.c
drivers/target/target_core_iblock.c
drivers/target/target_core_internal.h
drivers/target/target_core_pscsi.c
drivers/target/target_core_rd.c
drivers/target/target_core_user.c
include/target/target_core_backend.h
include/target/target_core_base.h