Skip to content

Commit 0f98212

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: core: Remove the .slave_configure() method
Now that all SCSI drivers have been converted from .slave_configure() to .sdev_configure(), remove support for .slave_configure() from the SCSI core. Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 49515b7 commit 0f98212

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

drivers/scsi/scsi_scan.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,6 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
10761076

10771077
if (hostt->sdev_configure)
10781078
ret = hostt->sdev_configure(sdev, &lim);
1079-
else if (hostt->slave_configure)
1080-
ret = hostt->slave_configure(sdev);
10811079
if (ret) {
10821080
queue_limits_cancel_update(sdev->request_queue);
10831081
/*
@@ -1102,7 +1100,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
11021100
* Set up budget map again since memory consumption of the map depends
11031101
* on actual queue depth.
11041102
*/
1105-
if (hostt->sdev_configure || hostt->slave_configure)
1103+
if (hostt->sdev_configure)
11061104
scsi_realloc_sdev_budget_map(sdev, sdev->queue_depth);
11071105

11081106
if (sdev->scsi_level >= SCSI_3)

include/scsi/scsi_host.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ struct scsi_host_template {
169169
*
170170
* Deallocation: If we didn't find any devices at this ID, you will
171171
* get an immediate call to sdev_destroy(). If we find something
172-
* here then you will get a call to slave_configure(), then the
172+
* here then you will get a call to sdev_configure(), then the
173173
* device will be used for however long it is kept around, then when
174174
* the device is removed from the system (or * possibly at reboot
175175
* time), you will then get a call to sdev_destroy(). This is
176-
* assuming you implement slave_configure and sdev_destroy.
176+
* assuming you implement sdev_configure and sdev_destroy.
177177
* However, if you allocate memory and hang it off the device struct,
178178
* then you must implement the sdev_destroy() routine at a minimum
179179
* in order to avoid leaking memory
@@ -211,19 +211,15 @@ struct scsi_host_template {
211211
* up after yourself before returning non-0
212212
*
213213
* Status: OPTIONAL
214-
*
215-
* Note: slave_configure is the legacy version, use sdev_configure for
216-
* all new code. A driver must never define both.
217214
*/
218215
int (* sdev_configure)(struct scsi_device *, struct queue_limits *lim);
219-
int (* slave_configure)(struct scsi_device *);
220216

221217
/*
222218
* Immediately prior to deallocating the device and after all activity
223219
* has ceased the mid layer calls this point so that the low level
224220
* driver may completely detach itself from the scsi device and vice
225221
* versa. The low level driver is responsible for freeing any memory
226-
* it allocated in the sdev_init or slave_configure calls.
222+
* it allocated in the sdev_init or sdev_configure calls.
227223
*
228224
* Status: OPTIONAL
229225
*/

0 commit comments

Comments
 (0)