Message ID | 20220512011749.1621689-1-chi.minghao@zte.com.cn (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | [SCSI] esas2r: Use kobj_to_dev() | expand |
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 7a4eadad23d7..f030ff6dc5b2 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -59,7 +59,7 @@ struct esas2r_adapter *esas2r_adapters[MAX_ADAPTERS]; static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct Scsi_Host *host = class_to_shost(dev); return (struct esas2r_adapter *)host->hostdata;