diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2011-10-11 14:20:28 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-10-14 12:43:15 -0400 |
commit | 9b8ad4ac790041b40146a3cb7aefe1a5a5db953d (patch) | |
tree | 610875d6d78018f3a894e09b4c705de50a29dded /drivers/ata/pata_sil680.c | |
parent | 6352187ee886811afe7f8f3cc08664f59b364aa8 (diff) |
pata_sil680: constify tables
Constify tables in sil680_set_[pio,dma]mode().
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_sil680.c')
-rw-r--r-- | drivers/ata/pata_sil680.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 0e2a5d22bbd3..caa426e6930f 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -105,8 +105,12 @@ static int sil680_cable_detect(struct ata_port *ap) { | |||
105 | 105 | ||
106 | static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) | 106 | static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) |
107 | { | 107 | { |
108 | static u16 speed_p[5] = { 0x328A, 0x2283, 0x1104, 0x10C3, 0x10C1 }; | 108 | static const u16 speed_p[5] = { |
109 | static u16 speed_t[5] = { 0x328A, 0x2283, 0x1281, 0x10C3, 0x10C1 }; | 109 | 0x328A, 0x2283, 0x1104, 0x10C3, 0x10C1 |
110 | }; | ||
111 | static const u16 speed_t[5] = { | ||
112 | 0x328A, 0x2283, 0x1281, 0x10C3, 0x10C1 | ||
113 | }; | ||
110 | 114 | ||
111 | unsigned long tfaddr = sil680_selreg(ap, 0x02); | 115 | unsigned long tfaddr = sil680_selreg(ap, 0x02); |
112 | unsigned long addr = sil680_seldev(ap, adev, 0x04); | 116 | unsigned long addr = sil680_seldev(ap, adev, 0x04); |
@@ -153,11 +157,11 @@ static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
153 | 157 | ||
154 | static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev) | 158 | static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev) |
155 | { | 159 | { |
156 | static u8 ultra_table[2][7] = { | 160 | static const u8 ultra_table[2][7] = { |
157 | { 0x0C, 0x07, 0x05, 0x04, 0x02, 0x01, 0xFF }, /* 100MHz */ | 161 | { 0x0C, 0x07, 0x05, 0x04, 0x02, 0x01, 0xFF }, /* 100MHz */ |
158 | { 0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01 }, /* 133Mhz */ | 162 | { 0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01 }, /* 133Mhz */ |
159 | }; | 163 | }; |
160 | static u16 dma_table[3] = { 0x2208, 0x10C2, 0x10C1 }; | 164 | static const u16 dma_table[3] = { 0x2208, 0x10C2, 0x10C1 }; |
161 | 165 | ||
162 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 166 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
163 | unsigned long ma = sil680_seldev(ap, adev, 0x08); | 167 | unsigned long ma = sil680_seldev(ap, adev, 0x08); |