]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
zfcp: Use device_driver default attribute groups.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 5 Dec 2007 11:50:31 +0000 (12:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:34 +0000 (20:40 -0800)
CC: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/s390/scsi/zfcp_ccw.c
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_sysfs_driver.c

index e01cbf152a81d3622a5d4a607b103ab472e607d0..86c3f6539a7da8b8612c66916941f92401710559 100644 (file)
@@ -52,6 +52,9 @@ static struct ccw_driver zfcp_ccw_driver = {
        .set_offline = zfcp_ccw_set_offline,
        .notify      = zfcp_ccw_notify,
        .shutdown    = zfcp_ccw_shutdown,
+       .driver = {
+               .groups = zfcp_driver_attr_groups,
+       },
 };
 
 MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id);
@@ -251,16 +254,7 @@ zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
 int __init
 zfcp_ccw_register(void)
 {
-       int retval;
-
-       retval = ccw_driver_register(&zfcp_ccw_driver);
-       if (retval)
-               goto out;
-       retval = zfcp_sysfs_driver_create_files(&zfcp_ccw_driver.driver);
-       if (retval)
-               ccw_driver_unregister(&zfcp_ccw_driver);
- out:
-       return retval;
+       return ccw_driver_register(&zfcp_ccw_driver);
 }
 
 /**
index 8534cf09546c3c120a6b23d4a1a8ebd76a6b7894..06b1079b7f3d8e53dbe0961e40a02b20df2cb5ba 100644 (file)
@@ -27,8 +27,7 @@
 extern struct zfcp_data zfcp_data;
 
 /******************************** SYSFS  *************************************/
-extern int  zfcp_sysfs_driver_create_files(struct device_driver *);
-extern void zfcp_sysfs_driver_remove_files(struct device_driver *);
+extern struct attribute_group *zfcp_driver_attr_groups[];
 extern int  zfcp_sysfs_adapter_create_files(struct device *);
 extern void zfcp_sysfs_adapter_remove_files(struct device *);
 extern int  zfcp_sysfs_port_create_files(struct device *, u32);
index 005e62f8593b66c021f28d174965f002f27a12a1..651edd58906a021fc71f6f12693998abadfd00a7 100644 (file)
@@ -98,28 +98,9 @@ static struct attribute_group zfcp_driver_attr_group = {
        .attrs = zfcp_driver_attrs,
 };
 
-/**
- * zfcp_sysfs_create_driver_files - create sysfs driver files
- * @dev: pointer to belonging device
- *
- * Create all sysfs attributes of the zfcp device driver
- */
-int
-zfcp_sysfs_driver_create_files(struct device_driver *drv)
-{
-       return sysfs_create_group(&drv->kobj, &zfcp_driver_attr_group);
-}
-
-/**
- * zfcp_sysfs_remove_driver_files - remove sysfs driver files
- * @dev: pointer to belonging device
- *
- * Remove all sysfs attributes of the zfcp device driver
- */
-void
-zfcp_sysfs_driver_remove_files(struct device_driver *drv)
-{
-       sysfs_remove_group(&drv->kobj, &zfcp_driver_attr_group);
-}
+struct attribute_group *zfcp_driver_attr_groups[] = {
+       &zfcp_driver_attr_group,
+       NULL,
+};
 
 #undef ZFCP_LOG_AREA