diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-floppy.c | 52 | ||||
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 2 |
3 files changed, 26 insertions, 30 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index ae8e1a64b8ad..04a357808f2e 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -606,26 +606,24 @@ static void idefloppy_input_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, uns | |||
606 | { | 606 | { |
607 | struct request *rq = pc->rq; | 607 | struct request *rq = pc->rq; |
608 | struct bio_vec *bvec; | 608 | struct bio_vec *bvec; |
609 | struct bio *bio; | 609 | struct req_iterator iter; |
610 | unsigned long flags; | 610 | unsigned long flags; |
611 | char *data; | 611 | char *data; |
612 | int count, i, done = 0; | 612 | int count, done = 0; |
613 | 613 | ||
614 | rq_for_each_bio(bio, rq) { | 614 | rq_for_each_segment(bvec, rq, iter) { |
615 | bio_for_each_segment(bvec, bio, i) { | 615 | if (!bcount) |
616 | if (!bcount) | 616 | break; |
617 | break; | ||
618 | 617 | ||
619 | count = min(bvec->bv_len, bcount); | 618 | count = min(bvec->bv_len, bcount); |
620 | 619 | ||
621 | data = bvec_kmap_irq(bvec, &flags); | 620 | data = bvec_kmap_irq(bvec, &flags); |
622 | drive->hwif->atapi_input_bytes(drive, data, count); | 621 | drive->hwif->atapi_input_bytes(drive, data, count); |
623 | bvec_kunmap_irq(data, &flags); | 622 | bvec_kunmap_irq(data, &flags); |
624 | 623 | ||
625 | bcount -= count; | 624 | bcount -= count; |
626 | pc->b_count += count; | 625 | pc->b_count += count; |
627 | done += count; | 626 | done += count; |
628 | } | ||
629 | } | 627 | } |
630 | 628 | ||
631 | idefloppy_do_end_request(drive, 1, done >> 9); | 629 | idefloppy_do_end_request(drive, 1, done >> 9); |
@@ -639,27 +637,25 @@ static void idefloppy_input_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, uns | |||
639 | static void idefloppy_output_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, unsigned int bcount) | 637 | static void idefloppy_output_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, unsigned int bcount) |
640 | { | 638 | { |
641 | struct request *rq = pc->rq; | 639 | struct request *rq = pc->rq; |
642 | struct bio *bio; | 640 | struct req_iterator iter; |
643 | struct bio_vec *bvec; | 641 | struct bio_vec *bvec; |
644 | unsigned long flags; | 642 | unsigned long flags; |
645 | int count, i, done = 0; | 643 | int count, done = 0; |
646 | char *data; | 644 | char *data; |
647 | 645 | ||
648 | rq_for_each_bio(bio, rq) { | 646 | rq_for_each_segment(bvec, rq, iter) { |
649 | bio_for_each_segment(bvec, bio, i) { | 647 | if (!bcount) |
650 | if (!bcount) | 648 | break; |
651 | break; | ||
652 | 649 | ||
653 | count = min(bvec->bv_len, bcount); | 650 | count = min(bvec->bv_len, bcount); |
654 | 651 | ||
655 | data = bvec_kmap_irq(bvec, &flags); | 652 | data = bvec_kmap_irq(bvec, &flags); |
656 | drive->hwif->atapi_output_bytes(drive, data, count); | 653 | drive->hwif->atapi_output_bytes(drive, data, count); |
657 | bvec_kunmap_irq(data, &flags); | 654 | bvec_kunmap_irq(data, &flags); |
658 | 655 | ||
659 | bcount -= count; | 656 | bcount -= count; |
660 | pc->b_count += count; | 657 | pc->b_count += count; |
661 | done += count; | 658 | done += count; |
662 | } | ||
663 | } | 659 | } |
664 | 660 | ||
665 | idefloppy_do_end_request(drive, 1, done >> 9); | 661 | idefloppy_do_end_request(drive, 1, done >> 9); |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 80013d2bb039..d04b966b4347 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -585,7 +585,7 @@ out: | |||
585 | * Cable special cases | 585 | * Cable special cases |
586 | */ | 586 | */ |
587 | 587 | ||
588 | static struct dmi_system_id cable_dmi_table[] = { | 588 | static const struct dmi_system_id cable_dmi_table[] = { |
589 | { | 589 | { |
590 | .ident = "HP Pavilion N5430", | 590 | .ident = "HP Pavilion N5430", |
591 | .matches = { | 591 | .matches = { |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 3611ca6b13b7..378feb491ec4 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -409,7 +409,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const | |||
409 | * Cable special cases | 409 | * Cable special cases |
410 | */ | 410 | */ |
411 | 411 | ||
412 | static struct dmi_system_id cable_dmi_table[] = { | 412 | static const struct dmi_system_id cable_dmi_table[] = { |
413 | { | 413 | { |
414 | .ident = "Acer Ferrari 3400", | 414 | .ident = "Acer Ferrari 3400", |
415 | .matches = { | 415 | .matches = { |