diff options
-rw-r--r-- | drivers/ide/legacy/ali14xx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index 0973c85e49b7..10311ecc674a 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
@@ -102,6 +102,8 @@ static void outReg (u8 data, u8 reg) | |||
102 | outb_p(data, dataPort); | 102 | outb_p(data, dataPort); |
103 | } | 103 | } |
104 | 104 | ||
105 | static DEFINE_SPINLOCK(ali14xx_lock); | ||
106 | |||
105 | /* | 107 | /* |
106 | * Set PIO mode for the specified drive. | 108 | * Set PIO mode for the specified drive. |
107 | * This function computes timing parameters | 109 | * This function computes timing parameters |
@@ -129,14 +131,14 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
129 | 131 | ||
130 | /* stuff timing parameters into controller registers */ | 132 | /* stuff timing parameters into controller registers */ |
131 | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; | 133 | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; |
132 | spin_lock_irqsave(&ide_lock, flags); | 134 | spin_lock_irqsave(&ali14xx_lock, flags); |
133 | outb_p(regOn, basePort); | 135 | outb_p(regOn, basePort); |
134 | outReg(param1, regTab[driveNum].reg1); | 136 | outReg(param1, regTab[driveNum].reg1); |
135 | outReg(param2, regTab[driveNum].reg2); | 137 | outReg(param2, regTab[driveNum].reg2); |
136 | outReg(param3, regTab[driveNum].reg3); | 138 | outReg(param3, regTab[driveNum].reg3); |
137 | outReg(param4, regTab[driveNum].reg4); | 139 | outReg(param4, regTab[driveNum].reg4); |
138 | outb_p(regOff, basePort); | 140 | outb_p(regOff, basePort); |
139 | spin_unlock_irqrestore(&ide_lock, flags); | 141 | spin_unlock_irqrestore(&ali14xx_lock, flags); |
140 | } | 142 | } |
141 | 143 | ||
142 | /* | 144 | /* |