[S390] dcssblk: revert devt conversion
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Fri, 12 Jun 2009 08:26:35 +0000 (10:26 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 12 Jun 2009 08:27:34 +0000 (10:27 +0200)
git commit f331c0296f2a9fee0d396a70598b954062603015 changed users of
->first_minor to devt. This broke device handling in dcssblk, so that
no additional devices could be added after the first one.

This patch reverts the devt conversion to the previous ->first_minor
handling.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dcssblk.c

index a4c7ffc..b21caf1 100644 (file)
@@ -127,7 +127,7 @@ dcssblk_assign_free_minor(struct dcssblk_dev_info *dev_info)
                found = 0;
                // test if minor available
                list_for_each_entry(entry, &dcssblk_devices, lh)
-                       if (minor == MINOR(disk_devt(entry->gd)))
+                       if (minor == entry->gd->first_minor)
                                found++;
                if (!found) break; // got unused minor
        }
@@ -625,7 +625,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
        if (rc)
                goto release_gd;
        sprintf(dev_info->gd->disk_name, "dcssblk%d",
-               MINOR(disk_devt(dev_info->gd)));
+               dev_info->gd->first_minor);
        list_add_tail(&dev_info->lh, &dcssblk_devices);
 
        if (!try_module_get(THIS_MODULE)) {