aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_proc.c')
-rw-r--r--drivers/s390/block/dasd_proc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 43c34f8c5e68..fff9020d4886 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -9,7 +9,7 @@
9 * 9 *
10 * /proc interface for the dasd driver. 10 * /proc interface for the dasd driver.
11 * 11 *
12 * $Revision: 1.32 $ 12 * $Revision: 1.33 $
13 */ 13 */
14 14
15#include <linux/config.h> 15#include <linux/config.h>
@@ -55,7 +55,6 @@ dasd_devices_show(struct seq_file *m, void *v)
55{ 55{
56 struct dasd_device *device; 56 struct dasd_device *device;
57 char *substr; 57 char *substr;
58 int feature;
59 58
60 device = dasd_device_from_devindex((unsigned long) v - 1); 59 device = dasd_device_from_devindex((unsigned long) v - 1);
61 if (IS_ERR(device)) 60 if (IS_ERR(device))
@@ -79,10 +78,7 @@ dasd_devices_show(struct seq_file *m, void *v)
79 else 78 else
80 seq_printf(m, " is ????????"); 79 seq_printf(m, " is ????????");
81 /* Print devices features. */ 80 /* Print devices features. */
82 feature = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); 81 substr = (device->features & DASD_FEATURE_READONLY) ? "(ro)" : " ";
83 if (feature < 0)
84 return 0;
85 substr = feature ? "(ro)" : " ";
86 seq_printf(m, "%4s: ", substr); 82 seq_printf(m, "%4s: ", substr);
87 /* Print device status information. */ 83 /* Print device status information. */
88 switch ((device != NULL) ? device->state : -1) { 84 switch ((device != NULL) ? device->state : -1) {