aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
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
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')
-rw-r--r--drivers/ide/ide-disk.c5
-rw-r--r--drivers/ide/ide-iops.c2
-rw-r--r--drivers/ide/ide-probe.c2
-rw-r--r--drivers/ide/ide-proc.c5
-rw-r--r--drivers/ide/ide-taskfile.c2
5 files changed, 9 insertions, 7 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
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index ee44878e40d0..6256c2df62cc 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -693,7 +693,7 @@ int ide_driveid_update(ide_drive_t *drive)
693 } 693 }
694 local_irq_save(flags); 694 local_irq_save(flags);
695 SELECT_MASK(drive, 0); 695 SELECT_MASK(drive, 0);
696 id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC); 696 id = kmalloc(SECTOR_SIZE, GFP_ATOMIC);
697 if (!id) { 697 if (!id) {
698 local_irq_restore(flags); 698 local_irq_restore(flags);
699 return 0; 699 return 0;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 62f7e1ef10c1..be121ffcc1dc 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -561,7 +561,7 @@ static inline u8 probe_for_drive (ide_drive_t *drive)
561 * Also note that 0 everywhere means "can't do X" 561 * Also note that 0 everywhere means "can't do X"
562 */ 562 */
563 563
564 drive->id = kzalloc(SECTOR_WORDS *4, GFP_KERNEL); 564 drive->id = kzalloc(SECTOR_SIZE, GFP_KERNEL);
565 drive->id_read = 0; 565 drive->id_read = 0;
566 if(drive->id == NULL) 566 if(drive->id == NULL)
567 { 567 {
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 5634b3971d21..6489c647be82 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -100,13 +100,14 @@ static int proc_ide_read_identify
100 100
101 err = taskfile_lib_get_identify(drive, page); 101 err = taskfile_lib_get_identify(drive, page);
102 if (!err) { 102 if (!err) {
103 char *out = ((char *)page) + (SECTOR_WORDS * 4); 103 char *out = (char *)page + SECTOR_SIZE;
104
104 page = out; 105 page = out;
105 do { 106 do {
106 out += sprintf(out, "%04x%c", 107 out += sprintf(out, "%04x%c",
107 le16_to_cpup(val), (++i & 7) ? ' ' : '\n'); 108 le16_to_cpup(val), (++i & 7) ? ' ' : '\n');
108 val += 1; 109 val += 1;
109 } while (i < (SECTOR_WORDS * 2)); 110 } while (i < SECTOR_SIZE / 2);
110 len = out - page; 111 len = out - page;
111 } 112 }
112 } 113 }
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index b1fb815dbf68..7ffe9004a4d6 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -768,7 +768,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
768 768
769 if (args[3]) { 769 if (args[3]) {
770 tfargs.tf_flags |= IDE_TFLAG_IO_16BIT; 770 tfargs.tf_flags |= IDE_TFLAG_IO_16BIT;
771 bufsize = SECTOR_WORDS * 4 * args[3]; 771 bufsize = SECTOR_SIZE * args[3];
772 buf = kzalloc(bufsize, GFP_KERNEL); 772 buf = kzalloc(bufsize, GFP_KERNEL);
773 if (buf == NULL) 773 if (buf == NULL)
774 return -ENOMEM; 774 return -ENOMEM;