From 25458eb791acf0e5e65183c5adb3918d8d71d756 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Tue, 24 Nov 2009 16:54:02 +0100 Subject: [SCSI] zfcp: Access ports and units with container_of in sysfs code When accessing port and unit attributes, use container_of instead of dev_get_drvdata. This eliminates some code checker warnings about aliased access of data structures. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_aux.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/s390/scsi/zfcp_aux.c') diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ed31bd0ff3f..baef2ec7482 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -319,7 +319,6 @@ struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun) kfree(unit); goto err_out; } - dev_set_drvdata(&unit->sysfs_device, unit); retval = -EINVAL; /* mark unit unusable as long as sysfs registration is not complete */ @@ -688,7 +687,6 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, kfree(port); goto err_out; } - dev_set_drvdata(&port->sysfs_device, port); retval = -EINVAL; if (device_register(&port->sysfs_device)) { -- cgit v1.2.3