From: Uwe Kleine-König Date: Fri, 19 Dec 2025 09:25:34 +0000 (+0100) Subject: scsi: ses: Convert to SCSI bus methods X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a71d5deea6e95b6155ea22e5db6feb92634307b4;p=thirdparty%2Fkernel%2Flinux.git scsi: ses: Convert to SCSI bus methods 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 --- 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, }, };