mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Remove bad mutex_* calls in telechips i2c driver
These were being called in a cpu mode they shouldn't have been, leading to panics. Change-Id: I7fbd0e4af5c6cbaf7177f9dafa901b3924617d7f
This commit is contained in:
parent
ca228d3d87
commit
0dbf7017be
1 changed files with 0 additions and 7 deletions
|
@ -36,11 +36,8 @@ static inline void delay_loop(void)
|
||||||
|
|
||||||
#define DELAY delay_loop()
|
#define DELAY delay_loop()
|
||||||
|
|
||||||
static struct mutex i2c_mtx;
|
|
||||||
|
|
||||||
void i2c_init(void)
|
void i2c_init(void)
|
||||||
{
|
{
|
||||||
mutex_init(&i2c_mtx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void i2c_start(void)
|
void i2c_start(void)
|
||||||
|
@ -152,7 +149,6 @@ int i2c_getack(void)
|
||||||
int i2c_write(int device, const unsigned char* buf, int count )
|
int i2c_write(int device, const unsigned char* buf, int count )
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
mutex_lock(&i2c_mtx);
|
|
||||||
|
|
||||||
i2c_start();
|
i2c_start();
|
||||||
i2c_outb(device & 0xfe);
|
i2c_outb(device & 0xfe);
|
||||||
|
@ -163,7 +159,6 @@ int i2c_write(int device, const unsigned char* buf, int count )
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_stop();
|
i2c_stop();
|
||||||
mutex_unlock(&i2c_mtx);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +167,6 @@ int i2c_write(int device, const unsigned char* buf, int count )
|
||||||
int i2c_readmem(int device, int address, unsigned char* buf, int count )
|
int i2c_readmem(int device, int address, unsigned char* buf, int count )
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
mutex_lock(&i2c_mtx);
|
|
||||||
|
|
||||||
i2c_start();
|
i2c_start();
|
||||||
i2c_outb(device & 0xfe);
|
i2c_outb(device & 0xfe);
|
||||||
|
@ -193,6 +187,5 @@ int i2c_readmem(int device, int address, unsigned char* buf, int count )
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
i2c_stop();
|
i2c_stop();
|
||||||
mutex_unlock(&i2c_mtx);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue