diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-26 22:52:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-26 22:52:53 -0800 |
commit | 0444fa78751260b38f0db3418e001bf86593f05f (patch) | |
tree | ffd3bd72c7078d705216ef156cae63d990125113 /drivers/s390/block/dasd_proc.c | |
parent | 69e4d4c3e1cb23fce81deeae08b502d27bad6993 (diff) | |
parent | 9d40d2e3955185b69c264583d080eb3defcb05a0 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (56 commits)
[S390] replace lock_cpu_hotplug with get_online_cpus
[S390] usage of s390dbf: shrink number of debug areas to use.
[S390] constify function pointer tables.
[S390] do local_irq_restore while spinning in spin_lock_irqsave.
[S390] add smp_call_function_mask
[S390] dasd: fix loop in request expiration handling
[S390] Unused field / extern declaration in processor.h
[S390] Remove TOPDIR from Makefile
[S390] dasd: add hyper PAV support to DASD device driver, part 1
[S390] single-step cleanup
[S390] Move NOTES and BUG_TABLE.
[S390] drivers/s390/: Spelling fixes
[S390] include/asm-s390/: Spelling fixes
[S390] arch/s390/: Spelling fixes
[S390] Use diag308 subcodes 3 and 6 for reboot and dump when possible.
[S390] vmemmap: allocate struct pages before 1:1 mapping
[S390] Initialize sclp_ipl_info
[S390] Allocate and free cpu lowcores and stacks when needed/possible.
[S390] use LIST_HEAD instead of LIST_HEAD_INIT
[S390] Load disabled wait psw instead of stopping cpu on halt.
...
Diffstat (limited to 'drivers/s390/block/dasd_proc.c')
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index ac7e8ef504c..28a86f07004 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c @@ -54,11 +54,16 @@ static int dasd_devices_show(struct seq_file *m, void *v) { struct dasd_device *device; + struct dasd_block *block; char *substr; device = dasd_device_from_devindex((unsigned long) v - 1); if (IS_ERR(device)) return 0; + if (device->block) + block = device->block; + else + return 0; /* Print device number. */ seq_printf(m, "%s", device->cdev->dev.bus_id); /* Print discipline string. */ @@ -67,14 +72,14 @@ dasd_devices_show(struct seq_file *m, void *v) else seq_printf(m, "(none)"); /* Print kdev. */ - if (device->gdp) + if (block->gdp) seq_printf(m, " at (%3d:%6d)", - device->gdp->major, device->gdp->first_minor); + block->gdp->major, block->gdp->first_minor); else seq_printf(m, " at (???:??????)"); /* Print device name. */ - if (device->gdp) - seq_printf(m, " is %-8s", device->gdp->disk_name); + if (block->gdp) + seq_printf(m, " is %-8s", block->gdp->disk_name); else seq_printf(m, " is ????????"); /* Print devices features. */ @@ -100,14 +105,14 @@ dasd_devices_show(struct seq_file *m, void *v) case DASD_STATE_READY: case DASD_STATE_ONLINE: seq_printf(m, "active "); - if (dasd_check_blocksize(device->bp_block)) + if (dasd_check_blocksize(block->bp_block)) seq_printf(m, "n/f "); else seq_printf(m, "at blocksize: %d, %ld blocks, %ld MB", - device->bp_block, device->blocks, - ((device->bp_block >> 9) * - device->blocks) >> 11); + block->bp_block, block->blocks, + ((block->bp_block >> 9) * + block->blocks) >> 11); break; default: seq_printf(m, "no stat"); @@ -137,7 +142,7 @@ static void dasd_devices_stop(struct seq_file *m, void *v) { } -static struct seq_operations dasd_devices_seq_ops = { +static const struct seq_operations dasd_devices_seq_ops = { .start = dasd_devices_start, .next = dasd_devices_next, .stop = dasd_devices_stop, |