aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/chipsets/ata-acerlabs.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2012-03-21 16:59:39 +0000
committerMarius Strobl <marius@FreeBSD.org>2012-03-21 16:59:39 +0000
commit5187458fcd38980b244fd08e96ca952cd3a07058 (patch)
treeecf4732c0a19395313044e11b9f3ed72b03a4eea /sys/dev/ata/chipsets/ata-acerlabs.c
parentce30db0b31b3ceb47f24f283a4a931d5bb04dd16 (diff)
downloadsrc-5187458fcd38980b244fd08e96ca952cd3a07058.tar.gz
src-5187458fcd38980b244fd08e96ca952cd3a07058.zip
- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END. - Use NULL instead of 0 for pointers MFC after: 1 week
Notes
Notes: svn path=/head/; revision=233282
Diffstat (limited to 'sys/dev/ata/chipsets/ata-acerlabs.c')
-rw-r--r--sys/dev/ata/chipsets/ata-acerlabs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ata/chipsets/ata-acerlabs.c b/sys/dev/ata/chipsets/ata-acerlabs.c
index 8281d0f79511..6b2637b90c36 100644
--- a/sys/dev/ata/chipsets/ata-acerlabs.c
+++ b/sys/dev/ata/chipsets/ata-acerlabs.c
@@ -75,7 +75,7 @@ static int
ata_ali_probe(device_t dev)
{
struct ata_pci_controller *ctlr = device_get_softc(dev);
- static struct ata_chip_id ids[] =
+ static const struct ata_chip_id const ids[] =
{{ ATA_ALI_5289, 0x00, 2, ALI_SATA, ATA_SA150, "M5289" },
{ ATA_ALI_5288, 0x00, 4, ALI_SATA, ATA_SA300, "M5288" },
{ ATA_ALI_5287, 0x00, 4, ALI_SATA, ATA_SA150, "M5287" },
@@ -304,11 +304,12 @@ ata_ali_setmode(device_t dev, int target, int mode)
struct ata_channel *ch = device_get_softc(dev);
int devno = (ch->unit << 1) + target;
int piomode;
- u_int32_t piotimings[] =
+ static const uint32_t piotimings[] =
{ 0x006d0003, 0x00580002, 0x00440001, 0x00330001,
0x00310001, 0x006d0003, 0x00330001, 0x00310001 };
- u_int8_t udma[] = {0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0d};
- u_int32_t word54;
+ static const uint8_t udma[] = {0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f,
+ 0x0d};
+ uint32_t word54;
mode = min(mode, ctlr->chip->max_dma);