]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: core: sysfs: Make use of bus callbacks
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 19 Dec 2025 09:25:31 +0000 (10:25 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Jan 2026 02:31:58 +0000 (21:31 -0500)
commitf7d4f1bf5724e52de049c619beddd53c62206624
tree47062a5598c3dab5a676e4d0cb683e9cb7f80412
parent7d42bcea57ae139e2ed754425cc5fc44e260c890
scsi: core: sysfs: Make use of bus callbacks

Introduce a bus-specific probe, remove and shutdown function. For now
this only allows to get rid of a cast of the generic device to a SCSI
device in the drivers and changes the remove prototype to return
void---a non-zero return value is ignored anyhow.

The objective is to get rid of users of struct device_driver callbacks
.probe(), .remove() and .shutdown() to eventually remove these. Until
all SCSI drivers are converted, this results in a runtime warning about
the drivers needing an update because there is a bus probe function and
a driver probe function. The in-tree drivers are fixed by the following
commits.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/a54e363a3fd2054fb924afd7df44bca7f444b5f1.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_driver.h