summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-03-08 22:59:41 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-03-08 22:59:41 +0000
commite8196b3c797438e8bf2ac39c425deba3f949e476 (patch)
treed5e8a8ae0742ae240d744e2f59963dd68678ee77 /firmware
parentb43b19136a96bad33cd99f4406a64b2d44605131 (diff)
Minor correction to irq masking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8964 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/i2c-pp5020.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/i2c-pp5020.c b/firmware/drivers/i2c-pp5020.c
index 0c594ecbe3..232de9cb5a 100644
--- a/firmware/drivers/i2c-pp5020.c
+++ b/firmware/drivers/i2c-pp5020.c
@@ -81,18 +81,16 @@ static int ipod_i2c_read_byte(unsigned int addr, unsigned int *data)
outb(inb(IPOD_I2C_CTRL) | IPOD_I2C_SEND, IPOD_I2C_CTRL);
- set_irq_level(old_irq_level);
-
if (data)
{
if (ipod_i2c_wait_not_busy() < 0)
{
+ set_irq_level(old_irq_level);
return -1;
}
- old_irq_level = set_irq_level(HIGHEST_IRQ_LEVEL);
*data = inb(IPOD_I2C_DATA0);
- set_irq_level(old_irq_level);
}
+ set_irq_level(old_irq_level);
}
return 0;