|
@@ -145,6 +145,7 @@ int zfcp_unit_add(struct zfcp_port *port, u64 fcp_lun)
|
|
|
unit->fcp_lun = fcp_lun;
|
|
|
unit->dev.parent = &port->dev;
|
|
|
unit->dev.release = zfcp_unit_release;
|
|
|
+ unit->dev.groups = zfcp_unit_attr_groups;
|
|
|
INIT_WORK(&unit->scsi_work, zfcp_unit_scsi_scan_work);
|
|
|
|
|
|
if (dev_set_name(&unit->dev, "0x%016llx",
|
|
@@ -160,12 +161,6 @@ int zfcp_unit_add(struct zfcp_port *port, u64 fcp_lun)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- if (sysfs_create_group(&unit->dev.kobj, &zfcp_sysfs_unit_attrs)) {
|
|
|
- device_unregister(&unit->dev);
|
|
|
- retval = -EINVAL;
|
|
|
- goto out;
|
|
|
- }
|
|
|
-
|
|
|
atomic_inc(&port->units); /* under zfcp_sysfs_port_units_mutex ! */
|
|
|
|
|
|
write_lock_irq(&port->unit_list_lock);
|
|
@@ -254,7 +249,7 @@ int zfcp_unit_remove(struct zfcp_port *port, u64 fcp_lun)
|
|
|
|
|
|
put_device(&unit->dev);
|
|
|
|
|
|
- zfcp_device_unregister(&unit->dev, &zfcp_sysfs_unit_attrs);
|
|
|
+ device_unregister(&unit->dev);
|
|
|
|
|
|
return 0;
|
|
|
}
|