]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD...
authorPaul Menzel <paulepanter@users.sourceforge.net>
Thu, 28 May 2015 17:14:19 +0000 (19:14 +0200)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 12 Jun 2015 06:43:00 +0000 (09:43 +0300)
Instead of hard coding `2` and `4` use the macros defined already at the
top of the file. As a consequence, wrap the now too long line.

grub-core/disk/ahci.c

index da5fead263010540acc19892bc504b9941251bce..f4725e8c16b727c2531561f17584f9f318795ea6 100644 (file)
@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev,
                      adevs[i]->hba->ports[adevs[i]->port].sata_error);
 
        adevs[i]->hba->ports[adevs[i]->port].command
-         = (adevs[i]->hba->ports[adevs[i]->port].command & 0x0fffffff) | (1 << 28) | 2 | 4;
+         = (adevs[i]->hba->ports[adevs[i]->port].command & 0x0fffffff) | (1 << 28)
+         | GRUB_AHCI_HBA_PORT_CMD_SPIN_UP
+         | GRUB_AHCI_HBA_PORT_CMD_POWER_ON;
 
        /*  struct grub_disk_ata_pass_through_parms parms2;
            grub_memset (&parms2, 0, sizeof (parms2));