From a71d5deea6e95b6155ea22e5db6feb92634307b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 19 Dec 2025 10:25:34 +0100 Subject: [PATCH] scsi: ses: Convert to SCSI bus methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. There is no need for an empty remove callback, no remove callback has the same semantics. So instead of converting the remove callback, drop it. Signed-off-by: Uwe Kleine-König Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/7124bf21c02a116bca13940e40e97373fd776590.1766133330.git.u.kleine-koenig@baylibre.com Signed-off-by: Martin K. Petersen --- drivers/scsi/ses.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index f8f5164f3de23..789b170da6527 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -42,9 +42,8 @@ static bool ses_page2_supported(struct enclosure_device *edev) return (ses_dev->page2 != NULL); } -static int ses_probe(struct device *dev) +static int ses_probe(struct scsi_device *sdev) { - struct scsi_device *sdev = to_scsi_device(dev); int err = -ENODEV; if (sdev->type != TYPE_ENCLOSURE) @@ -847,11 +846,6 @@ page2_not_supported: return err; } -static int ses_remove(struct device *dev) -{ - return 0; -} - static void ses_intf_remove_component(struct scsi_device *sdev) { struct enclosure_device *edev, *prev = NULL; @@ -906,10 +900,9 @@ static struct class_interface ses_interface = { }; static struct scsi_driver ses_template = { + .probe = ses_probe, .gendrv = { .name = "ses", - .probe = ses_probe, - .remove = ses_remove, }, }; -- 2.47.3