Skip to content

Commit c45b380

Browse files
leesagaciousmartinkpetersen
authored andcommitted
scsi: scsi_debug: Remove redundant driver match function
If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device(). Drop the pseudo_lld bus match function that always returned 1. This results in the same behaviour as when there is no match function. [mkp+jgg: patch description] Signed-off-by: Lizhe <sensor1010@163.com> Link: https://lore.kernel.org/r/20230319042732.278691-1-sensor1010@163.com Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ae2fb3c commit c45b380

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

drivers/scsi/scsi_debug.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7893,15 +7893,8 @@ static void sdebug_driver_remove(struct device *dev)
78937893
scsi_host_put(sdbg_host->shost);
78947894
}
78957895

7896-
static int pseudo_lld_bus_match(struct device *dev,
7897-
struct device_driver *dev_driver)
7898-
{
7899-
return 1;
7900-
}
7901-
79027896
static struct bus_type pseudo_lld_bus = {
79037897
.name = "pseudo",
7904-
.match = pseudo_lld_bus_match,
79057898
.probe = sdebug_driver_probe,
79067899
.remove = sdebug_driver_remove,
79077900
.drv_groups = sdebug_drv_groups,

0 commit comments

Comments
 (0)