aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:28 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:28 -0400
commit151a670186a0f8441798f90c8701647adb7a1589 (patch)
tree6932543816b57d841515c48b536c38596bdad139 /drivers/ide/ide-disk.c
parent8185d5aa93e0a5c111adc4952a5b87193a68ae5b (diff)
ide: remove SECTOR_WORDS define
Just use SECTOR_SIZE instead. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 2e43ae15fb1b..474070c1ddb6 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -539,13 +539,14 @@ static int proc_idedisk_read_smart(char *page, char **start, off_t off,
539 539
540 if (get_smart_data(drive, page, sub_cmd) == 0) { 540 if (get_smart_data(drive, page, sub_cmd) == 0) {
541 unsigned short *val = (unsigned short *) page; 541 unsigned short *val = (unsigned short *) page;
542 char *out = ((char *)val) + (SECTOR_WORDS * 4); 542 char *out = (char *)val + SECTOR_SIZE;
543
543 page = out; 544 page = out;
544 do { 545 do {
545 out += sprintf(out, "%04x%c", le16_to_cpu(*val), 546 out += sprintf(out, "%04x%c", le16_to_cpu(*val),
546 (++i & 7) ? ' ' : '\n'); 547 (++i & 7) ? ' ' : '\n');
547 val += 1; 548 val += 1;
548 } while (i < (SECTOR_WORDS * 2)); 549 } while (i < SECTOR_SIZE / 2);
549 len = out - page; 550 len = out - page;
550 } 551 }
551 552