aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-07-16 20:33:47 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 20:33:47 +0200
commit68dc3575e064a5655cbd656fbf32d6ceeb85ac9e (patch)
treebd623c5102365bd1169244e3d514ca3f9260fdb5 /drivers/ide
parentc96a7df8dba5800c03b0f1edd87b2f3d0473a119 (diff)
downloadkernel_samsung_smdk4412-68dc3575e064a5655cbd656fbf32d6ceeb85ac9e.zip
kernel_samsung_smdk4412-68dc3575e064a5655cbd656fbf32d6ceeb85ac9e.tar.gz
kernel_samsung_smdk4412-68dc3575e064a5655cbd656fbf32d6ceeb85ac9e.tar.bz2
ide-floppy: zero out the whole struct ide_atapi_pc on init
This is a precaution just to make sure a new pc is clean when allocated. There should be no functional change introduced by this patch. [bart: ported it over IDE changes] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-floppy.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index df19ede..00948c3 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -351,10 +351,7 @@ static void ide_floppy_callback(ide_drive_t *drive)
static void idefloppy_init_pc(struct ide_atapi_pc *pc)
{
- memset(pc->c, 0, 12);
- pc->retries = 0;
- pc->flags = 0;
- pc->req_xfer = 0;
+ memset(pc, 0, sizeof(*pc));
pc->buf = pc->pc_buf;
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
pc->callback = ide_floppy_callback;