Skip to content

Commit 56868a4

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE updates from David Miller: "Two small cleanups in the IDE layer" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: don't call memcpy with the same source and destination ide: use setup_timer
2 parents 7fc22f4 + acfead3 commit 56868a4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/ide/ide-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
107107

108108
if (cmd->tf_flags & IDE_TFLAG_DYN)
109109
kfree(orig_cmd);
110-
else
110+
else if (cmd != orig_cmd)
111111
memcpy(orig_cmd, cmd, sizeof(*cmd));
112112
}
113113
}

drivers/ide/ide-probe.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)
11831183

11841184
spin_lock_init(&hwif->lock);
11851185

1186-
init_timer(&hwif->timer);
1187-
hwif->timer.function = &ide_timer_expiry;
1188-
hwif->timer.data = (unsigned long)hwif;
1186+
setup_timer(&hwif->timer, &ide_timer_expiry, (unsigned long)hwif);
11891187

11901188
init_completion(&hwif->gendev_rel_comp);
11911189

0 commit comments

Comments
 (0)