[PATCH] fix rmmod problems with elevator attributes, clean them up
diff --git a/block/elevator.c b/block/elevator.c
index 0d2db53..db3d0d8 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -699,11 +699,12 @@
 
 	error = kobject_add(&e->kobj);
 	if (!error) {
-		struct attribute **attr = e->elevator_type->elevator_attrs;
+		struct elv_fs_entry *attr = e->elevator_type->elevator_attrs;
 		if (attr) {
-			while (*attr) {
-				if (sysfs_create_file(&e->kobj,*attr++))
+			while (attr->attr.name) {
+				if (sysfs_create_file(&e->kobj, &attr->attr))
 					break;
+				attr++;
 			}
 		}
 		kobject_uevent(&e->kobj, KOBJ_ADD);