mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 05:51:14 -04:00
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 <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>
This commit is contained in:
committed by
Martin K. Petersen
parent
63b541f054
commit
a71d5deea6
@@ -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 @@ static int ses_intf_add(struct device *cdev)
|
||||
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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user