X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fblock%2Fdasd_genhd.c;h=1d52db406b2ef0eb9208124e9776fd201e249440;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=44b6e73f06e6c3044c1365a180a0195b9423165e;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 44b6e73f0..1d52db406 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -9,7 +9,7 @@ * * gendisk related functions for the dasd driver. * - * $Revision: 1.46 $ + * $Revision: 1.48 $ */ #include @@ -149,11 +149,12 @@ dasd_destroy_partitions(struct dasd_device * device) * Can't call delete_partitions directly. Use ioctl. * The ioctl also does locking and invalidation. */ - memset(&bpart, sizeof(struct blkpg_partition), 0); - memset(&barg, sizeof(struct blkpg_ioctl_arg), 0); + memset(&bpart, 0, sizeof(struct blkpg_partition)); + memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); barg.data = &bpart; + barg.op = BLKPG_DEL_PARTITION; for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) - ioctl_by_bdev(bdev, BLKPG_DEL_PARTITION, (unsigned long) &barg); + ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); invalidate_partition(device->gdp, 0); /* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */