summaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs.c
diff options
context:
space:
mode:
authorSebastian Ott2013-04-26 16:13:48 +0200
committerJames Bottomley2013-06-01 01:32:36 +0200
commit83d4e1c33d9329e6d53cf4ac0a02c98ac83eba05 (patch)
treea2c696af985b939f687c660ef65d15e6e655181b /drivers/s390/scsi/zfcp_sysfs.c
parent[SCSI] zfcp: cfdc fops add owner (diff)
downloadkernel-qcow2-linux-83d4e1c33d9329e6d53cf4ac0a02c98ac83eba05.tar.gz
kernel-qcow2-linux-83d4e1c33d9329e6d53cf4ac0a02c98ac83eba05.tar.xz
kernel-qcow2-linux-83d4e1c33d9329e6d53cf4ac0a02c98ac83eba05.zip
[SCSI] zfcp: cleanup port sysfs attribute usage
Let the driver core handle device attribute creation and removal. This will simplify the code and eliminates races between attribute availability and userspace notification via uevents. Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_sysfs.c')
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 1e0eb089dfba..d9261264a2b6 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -268,7 +268,7 @@ static ssize_t zfcp_sysfs_port_remove_store(struct device *dev,
put_device(&port->dev);
zfcp_erp_port_shutdown(port, 0, "syprs_1");
- zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs);
+ device_unregister(&port->dev);
out:
zfcp_ccw_adapter_put(adapter);
return retval ? retval : (ssize_t) count;
@@ -340,13 +340,13 @@ static struct attribute *zfcp_port_attrs[] = {
&dev_attr_port_access_denied.attr,
NULL
};
-
-/**
- * zfcp_sysfs_port_attrs - sysfs attributes for all other ports
- */
-struct attribute_group zfcp_sysfs_port_attrs = {
+static struct attribute_group zfcp_port_attr_group = {
.attrs = zfcp_port_attrs,
};
+const struct attribute_group *zfcp_port_attr_groups[] = {
+ &zfcp_port_attr_group,
+ NULL,
+};
static struct attribute *zfcp_unit_attrs[] = {
&dev_attr_unit_failed.attr,