diff options
author | Christoph Hellwig <hch@lst.de> | 2015-05-10 18:14:56 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-06-01 00:25:34 -0700 |
commit | 0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd (patch) | |
tree | 38dda3f7dc5e049761c80b55796e48cacbb6924c /include/target/target_core_base.h | |
parent | 4624773765699ac3f4e0b918306b638cba385713 (diff) | |
download | linux-0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd.tar.bz2 |
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>
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r-- | include/target/target_core_base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 78ed2a83838c..03e2ee8f8337 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -797,7 +797,7 @@ struct se_device { #define SE_UDEV_PATH_LEN 512 /* must be less than PAGE_SIZE */ unsigned char udev_path[SE_UDEV_PATH_LEN]; /* Pointer to template of function pointers for transport */ - struct se_subsystem_api *transport; + const struct target_backend_ops *transport; /* Linked list for struct se_hba struct se_device list */ struct list_head dev_list; struct se_lun xcopy_lun; @@ -819,7 +819,7 @@ struct se_hba { spinlock_t device_lock; struct config_group hba_group; struct mutex hba_access_mutex; - struct se_subsystem_api *transport; + struct target_backend *backend; }; struct scsi_port_stats { |