diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-11-24 10:54:02 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:02:04 -0500 |
commit | 25458eb791acf0e5e65183c5adb3918d8d71d756 (patch) | |
tree | e634ee6be885b096c8a8840f6b6a1184d1fb341d /drivers/s390/scsi/zfcp_aux.c | |
parent | b42aeceb35c59484056b0eea81203a0911ebb50d (diff) |
[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 <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ed31bd0ff3fb..baef2ec7482f 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) | |||
319 | kfree(unit); | 319 | kfree(unit); |
320 | goto err_out; | 320 | goto err_out; |
321 | } | 321 | } |
322 | dev_set_drvdata(&unit->sysfs_device, unit); | ||
323 | retval = -EINVAL; | 322 | retval = -EINVAL; |
324 | 323 | ||
325 | /* mark unit unusable as long as sysfs registration is not complete */ | 324 | /* 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, | |||
688 | kfree(port); | 687 | kfree(port); |
689 | goto err_out; | 688 | goto err_out; |
690 | } | 689 | } |
691 | dev_set_drvdata(&port->sysfs_device, port); | ||
692 | retval = -EINVAL; | 690 | retval = -EINVAL; |
693 | 691 | ||
694 | if (device_register(&port->sysfs_device)) { | 692 | if (device_register(&port->sysfs_device)) { |