Commit ea6f5b8b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix aec proc handling

parent f105a29b
......@@ -38,6 +38,7 @@ static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count)
char *chipset_nums[] = {"error", "error", "error", "error",
"error", "error", "850UF", "860",
"860R", "865", "865R", "error" };
int len;
int i;
for (i = 0; i < n_aec_devs; i++) {
......@@ -170,7 +171,11 @@ static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count)
#endif /* DEBUG_AEC_REGS */
}
}
return p-buffer;/* => must be less than 4k! */
/* p - buffer must be less than 4k! */
len = (p - buffer) - offset;
*addr = buffer + offset;
return len > count ? count : len;
}
#endif /* defined(DISPLAY_AEC62xx_TIMINGS) && defined(CONFIG_PROC_FS) */
......@@ -324,7 +329,7 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
ide_hwif_t *hwif = HWIF(drive);
struct hd_driveid *id = drive->id;
if (id && (id->capability & 1) && drive->autodma) {
if ((id->capability & 1) && drive->autodma) {
/* Consult the list of known "bad" drives */
if (hwif->ide_dma_bad_drive(drive))
goto fast_ata_pio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment