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 <u.kleine-koenig@baylibre.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/7124bf21c02a116bca13940e40e97373fd776590.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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)
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;
};
static struct scsi_driver ses_template = {
+ .probe = ses_probe,
.gendrv = {
.name = "ses",
- .probe = ses_probe,
- .remove = ses_remove,
},
};