Commit 2da13dc5 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix /proc for amd ide

parent f7c34e80
...@@ -98,6 +98,7 @@ static int amd74xx_get_info(char *buffer, char **addr, off_t offset, int count) ...@@ -98,6 +98,7 @@ static int amd74xx_get_info(char *buffer, char **addr, off_t offset, int count)
unsigned int v, u, i; unsigned int v, u, i;
unsigned short c, w; unsigned short c, w;
unsigned char t; unsigned char t;
int len;
char *p = buffer; char *p = buffer;
amd_print("----------AMD BusMastering IDE Configuration----------------"); amd_print("----------AMD BusMastering IDE Configuration----------------");
...@@ -167,7 +168,11 @@ static int amd74xx_get_info(char *buffer, char **addr, off_t offset, int count) ...@@ -167,7 +168,11 @@ static int amd74xx_get_info(char *buffer, char **addr, off_t offset, int count)
amd_print_drive("Cycle Time: ", "%8dns", cycle[i]); amd_print_drive("Cycle Time: ", "%8dns", cycle[i]);
amd_print_drive("Transfer Rate: ", "%4d.%dMB/s", speed[i] / 1000, speed[i] / 100 % 10); amd_print_drive("Transfer Rate: ", "%4d.%dMB/s", speed[i] / 1000, speed[i] / 100 % 10);
return p - buffer; /* hoping it is less than 4K... */ /* hoping p - buffer is less than 4K... */
len = (p - buffer) - offset;
*addr = buffer + offset;
return len > count ? count : len;
} }
#endif #endif
......
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