diff options
Diffstat (limited to 'drivers/ata/pata_bf54x.c')
-rw-r--r-- | drivers/ata/pata_bf54x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index 55516103626a..d3932901a3b3 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -1011,7 +1011,7 @@ static void bfin_bus_post_reset(struct ata_port *ap, unsigned int devmask) | |||
1011 | void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; | 1011 | void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; |
1012 | unsigned int dev0 = devmask & (1 << 0); | 1012 | unsigned int dev0 = devmask & (1 << 0); |
1013 | unsigned int dev1 = devmask & (1 << 1); | 1013 | unsigned int dev1 = devmask & (1 << 1); |
1014 | unsigned long timeout; | 1014 | unsigned long deadline; |
1015 | 1015 | ||
1016 | /* if device 0 was found in ata_devchk, wait for its | 1016 | /* if device 0 was found in ata_devchk, wait for its |
1017 | * BSY bit to clear | 1017 | * BSY bit to clear |
@@ -1022,7 +1022,7 @@ static void bfin_bus_post_reset(struct ata_port *ap, unsigned int devmask) | |||
1022 | /* if device 1 was found in ata_devchk, wait for | 1022 | /* if device 1 was found in ata_devchk, wait for |
1023 | * register access, then wait for BSY to clear | 1023 | * register access, then wait for BSY to clear |
1024 | */ | 1024 | */ |
1025 | timeout = jiffies + ATA_TMOUT_BOOT; | 1025 | deadline = ata_deadline(jiffies, ATA_TMOUT_BOOT); |
1026 | while (dev1) { | 1026 | while (dev1) { |
1027 | u8 nsect, lbal; | 1027 | u8 nsect, lbal; |
1028 | 1028 | ||
@@ -1031,7 +1031,7 @@ static void bfin_bus_post_reset(struct ata_port *ap, unsigned int devmask) | |||
1031 | lbal = read_atapi_register(base, ATA_REG_LBAL); | 1031 | lbal = read_atapi_register(base, ATA_REG_LBAL); |
1032 | if ((nsect == 1) && (lbal == 1)) | 1032 | if ((nsect == 1) && (lbal == 1)) |
1033 | break; | 1033 | break; |
1034 | if (time_after(jiffies, timeout)) { | 1034 | if (time_after(jiffies, deadline)) { |
1035 | dev1 = 0; | 1035 | dev1 = 0; |
1036 | break; | 1036 | break; |
1037 | } | 1037 | } |