diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-03 14:12:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:57 -0400 |
commit | 0f218ee2b7e474a5424fbd452c2e3a5da0599e99 (patch) | |
tree | 343a73d67279fa3472d9983ca6c292ac514385d7 | |
parent | 0b77ca66a6ef1ab353b112bb548ff7492836ecc3 (diff) |
Staging: pata_rdc: remove pointless comments
These comments contribute nothing to the code, and most were just cut
and pasted from another driver.
Cc: Kevin Huang <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/pata_rdc/pata_rdc.c | 83 |
1 files changed, 10 insertions, 73 deletions
diff --git a/drivers/staging/pata_rdc/pata_rdc.c b/drivers/staging/pata_rdc/pata_rdc.c index f87863c547ec..6252745250ef 100644 --- a/drivers/staging/pata_rdc/pata_rdc.c +++ b/drivers/staging/pata_rdc/pata_rdc.c | |||
@@ -617,23 +617,6 @@ funcexit: | |||
617 | return funcresult; | 617 | return funcresult; |
618 | } | 618 | } |
619 | 619 | ||
620 | /** | ||
621 | * Set port up for dma. | ||
622 | * @ap: Port to initialize | ||
623 | * | ||
624 | * Called just after data structures for each port are | ||
625 | * initialized. Allocates space for PRD table if the device | ||
626 | * is DMA capable SFF. | ||
627 | |||
628 | Some drivers also use this entry point as a chance to allocate driverprivate | ||
629 | memory for ap->private_data. | ||
630 | |||
631 | * | ||
632 | * May be used as the port_start() entry in ata_port_operations. | ||
633 | * | ||
634 | * LOCKING: | ||
635 | * Inherited from caller. | ||
636 | */ | ||
637 | static int rdc_pata_port_start(struct ata_port *ap) | 620 | static int rdc_pata_port_start(struct ata_port *ap) |
638 | { | 621 | { |
639 | uint Channel; | 622 | uint Channel; |
@@ -657,14 +640,6 @@ static void rdc_pata_port_stop(struct ata_port *ap) | |||
657 | dev_dbg(ap->dev, "%s Channel: %u\n", __func__, Channel); | 640 | dev_dbg(ap->dev, "%s Channel: %u\n", __func__, Channel); |
658 | } | 641 | } |
659 | 642 | ||
660 | /** | ||
661 | * prereset for PATA host controller | ||
662 | * @link: Target link | ||
663 | * @deadline: deadline jiffies for the operation | ||
664 | * | ||
665 | * LOCKING: | ||
666 | * None (inherited from caller). | ||
667 | */ | ||
668 | static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline) | 643 | static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline) |
669 | { | 644 | { |
670 | struct pci_dev *pdev; | 645 | struct pci_dev *pdev; |
@@ -690,16 +665,6 @@ static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline) | |||
690 | } | 665 | } |
691 | } | 666 | } |
692 | 667 | ||
693 | /** | ||
694 | * Probe host controller cable detect info | ||
695 | * @ap: Port for which cable detect info is desired | ||
696 | * | ||
697 | * Read cable indicator from ATA PCI device's PCI config | ||
698 | * register. This register is normally set by firmware (BIOS). | ||
699 | * | ||
700 | * LOCKING: | ||
701 | * None (inherited from caller). | ||
702 | */ | ||
703 | static int rdc_pata_cable_detect(struct ata_port *ap) | 668 | static int rdc_pata_cable_detect(struct ata_port *ap) |
704 | { | 669 | { |
705 | struct pci_dev *pdev; | 670 | struct pci_dev *pdev; |
@@ -732,16 +697,6 @@ static int rdc_pata_cable_detect(struct ata_port *ap) | |||
732 | } | 697 | } |
733 | } | 698 | } |
734 | 699 | ||
735 | /** | ||
736 | * Initialize host controller PATA PIO timings | ||
737 | * @ap: Port whose timings we are configuring | ||
738 | * @adev: um | ||
739 | * | ||
740 | * Set PIO mode for device, in host controller PCI config space. | ||
741 | * | ||
742 | * LOCKING: | ||
743 | * None (inherited from caller). | ||
744 | */ | ||
745 | static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) | 700 | static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) |
746 | { | 701 | { |
747 | struct pci_dev *pdev; | 702 | struct pci_dev *pdev; |
@@ -782,14 +737,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
782 | pdev, | 737 | pdev, |
783 | DeviceID, | 738 | DeviceID, |
784 | PIOTimingMode, | 739 | PIOTimingMode, |
785 | TRUE,/* DMAEnable, */ | 740 | TRUE, |
786 | PrefetchPostingEnable | 741 | PrefetchPostingEnable |
787 | ); | 742 | ); |
788 | 743 | ||
789 | ATAHostAdapter_SetPrimaryUDMA( | 744 | ATAHostAdapter_SetPrimaryUDMA( |
790 | pdev, | 745 | pdev, |
791 | DeviceID, | 746 | DeviceID, |
792 | FALSE,/* UDMAEnable, */ | 747 | FALSE, |
793 | UDMA0 | 748 | UDMA0 |
794 | ); | 749 | ); |
795 | } else { | 750 | } else { |
@@ -797,14 +752,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
797 | pdev, | 752 | pdev, |
798 | DeviceID, | 753 | DeviceID, |
799 | PIOTimingMode, | 754 | PIOTimingMode, |
800 | TRUE,/* DMAEnable, */ | 755 | TRUE, |
801 | PrefetchPostingEnable | 756 | PrefetchPostingEnable |
802 | ); | 757 | ); |
803 | 758 | ||
804 | ATAHostAdapter_SetSecondaryUDMA( | 759 | ATAHostAdapter_SetSecondaryUDMA( |
805 | pdev, | 760 | pdev, |
806 | DeviceID, | 761 | DeviceID, |
807 | FALSE,/* UDMAEnable, */ | 762 | FALSE, |
808 | UDMA0 | 763 | UDMA0 |
809 | ); | 764 | ); |
810 | } | 765 | } |
@@ -812,16 +767,6 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
812 | __func__, Channel, DeviceID, PIOTimingMode); | 767 | __func__, Channel, DeviceID, PIOTimingMode); |
813 | } | 768 | } |
814 | 769 | ||
815 | /** | ||
816 | * Initialize host controller PATA DMA timings | ||
817 | * @ap: Port whose timings we are configuring | ||
818 | * @adev: um | ||
819 | * | ||
820 | * Set MW/UDMA mode for device, in host controller PCI config space. | ||
821 | * | ||
822 | * LOCKING: | ||
823 | * None (inherited from caller). | ||
824 | */ | ||
825 | static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | 770 | static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) |
826 | { | 771 | { |
827 | struct pci_dev *pdev; | 772 | struct pci_dev *pdev; |
@@ -855,16 +800,13 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
855 | UDMAEnable = TRUE; | 800 | UDMAEnable = TRUE; |
856 | } | 801 | } |
857 | 802 | ||
858 | /*if (ap->mdma_mask == 0) { | ||
859 | }*/ | ||
860 | |||
861 | if (Channel == 0) { | 803 | if (Channel == 0) { |
862 | if (DMATimingMode >= XFER_UDMA_0) { | 804 | if (DMATimingMode >= XFER_UDMA_0) { |
863 | /* UDMA */ | 805 | /* UDMA */ |
864 | ATAHostAdapter_SetPrimaryPIO(pdev, | 806 | ATAHostAdapter_SetPrimaryPIO(pdev, |
865 | DeviceID, | 807 | DeviceID, |
866 | PIOTimingMode, | 808 | PIOTimingMode, |
867 | TRUE,/*DMAEnable,*/ | 809 | TRUE, |
868 | PrefetchPostingEnable); | 810 | PrefetchPostingEnable); |
869 | 811 | ||
870 | ATAHostAdapter_SetPrimaryUDMA(pdev, | 812 | ATAHostAdapter_SetPrimaryUDMA(pdev, |
@@ -880,12 +822,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
880 | ATAHostAdapter_SetPrimaryPIO(pdev, | 822 | ATAHostAdapter_SetPrimaryPIO(pdev, |
881 | DeviceID, | 823 | DeviceID, |
882 | (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ | 824 | (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ |
883 | TRUE,/*DMAEnable,*/ | 825 | TRUE, |
884 | PrefetchPostingEnable); | 826 | PrefetchPostingEnable); |
885 | 827 | ||
886 | ATAHostAdapter_SetPrimaryUDMA(pdev, | 828 | ATAHostAdapter_SetPrimaryUDMA(pdev, |
887 | DeviceID, | 829 | DeviceID, |
888 | FALSE,/*UDMAEnable,*/ | 830 | FALSE, |
889 | UDMA0); | 831 | UDMA0); |
890 | dev_dbg(ap->dev, | 832 | dev_dbg(ap->dev, |
891 | "%s: Channel: %u, DeviceID: %u, MDMA: %u\n", | 833 | "%s: Channel: %u, DeviceID: %u, MDMA: %u\n", |
@@ -898,7 +840,7 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
898 | ATAHostAdapter_SetSecondaryPIO(pdev, | 840 | ATAHostAdapter_SetSecondaryPIO(pdev, |
899 | DeviceID, | 841 | DeviceID, |
900 | PIOTimingMode, | 842 | PIOTimingMode, |
901 | TRUE,/*DMAEnable,*/ | 843 | TRUE, |
902 | PrefetchPostingEnable); | 844 | PrefetchPostingEnable); |
903 | 845 | ||
904 | ATAHostAdapter_SetSecondaryUDMA(pdev, | 846 | ATAHostAdapter_SetSecondaryUDMA(pdev, |
@@ -914,12 +856,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
914 | ATAHostAdapter_SetSecondaryPIO(pdev, | 856 | ATAHostAdapter_SetSecondaryPIO(pdev, |
915 | DeviceID, | 857 | DeviceID, |
916 | (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ | 858 | (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ |
917 | TRUE,/*DMAEnable,*/ | 859 | TRUE, |
918 | PrefetchPostingEnable); | 860 | PrefetchPostingEnable); |
919 | 861 | ||
920 | ATAHostAdapter_SetSecondaryUDMA(pdev, | 862 | ATAHostAdapter_SetSecondaryUDMA(pdev, |
921 | DeviceID, | 863 | DeviceID, |
922 | FALSE,/*UDMAEnable,*/ | 864 | FALSE, |
923 | UDMA0); | 865 | UDMA0); |
924 | dev_dbg(ap->dev, | 866 | dev_dbg(ap->dev, |
925 | "%s: Channel: %u, DeviceID: %u, MDMA: %u \n", | 867 | "%s: Channel: %u, DeviceID: %u, MDMA: %u \n", |
@@ -929,7 +871,6 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
929 | } | 871 | } |
930 | } | 872 | } |
931 | 873 | ||
932 | /* pata host template */ | ||
933 | static struct scsi_host_template rdc_pata_sht = { | 874 | static struct scsi_host_template rdc_pata_sht = { |
934 | ATA_BMDMA_SHT(KBUILD_MODNAME), | 875 | ATA_BMDMA_SHT(KBUILD_MODNAME), |
935 | }; | 876 | }; |
@@ -976,20 +917,16 @@ static int __devinit rdc_init_one(struct pci_dev *pdev, | |||
976 | port_info[0] = rdc_pata_port_info[ent->driver_data]; | 917 | port_info[0] = rdc_pata_port_info[ent->driver_data]; |
977 | port_info[1] = rdc_pata_port_info[ent->driver_data]; | 918 | port_info[1] = rdc_pata_port_info[ent->driver_data]; |
978 | 919 | ||
979 | /* enable device and prepare host */ | ||
980 | rc = pci_enable_device(pdev); | 920 | rc = pci_enable_device(pdev); |
981 | if (rc) { | 921 | if (rc) { |
982 | dev_dbg(&pdev->dev, "%s pci_enable_device failed\n", __func__); | 922 | dev_dbg(&pdev->dev, "%s pci_enable_device failed\n", __func__); |
983 | return rc; | 923 | return rc; |
984 | } | 924 | } |
985 | |||
986 | /* enable interrupt */ | ||
987 | pci_intx(pdev, 1); | 925 | pci_intx(pdev, 1); |
988 | 926 | ||
989 | return ata_pci_sff_init_one(pdev, ppinfo, &rdc_pata_sht, NULL); | 927 | return ata_pci_sff_init_one(pdev, ppinfo, &rdc_pata_sht, NULL); |
990 | } | 928 | } |
991 | 929 | ||
992 | /* a pci driver */ | ||
993 | static struct pci_driver rdc_pata_driver = { | 930 | static struct pci_driver rdc_pata_driver = { |
994 | .name = KBUILD_MODNAME, | 931 | .name = KBUILD_MODNAME, |
995 | .id_table = rdc_pata_id_table, | 932 | .id_table = rdc_pata_id_table, |