Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347067
b: refs/heads/master
c: 9bcd04b
h: refs/heads/master
i:
  347065: a92ce73
  347063: b4c45c8
v: v3
  • Loading branch information
Daniel Kurtz authored and Wolfram Sang committed Nov 16, 2012
1 parent 1403c03 commit c535bd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2693ac69880a33d4d9df6f128415b65e745f00ba
refs/heads/master: 9bcd04bfbbd5599de011176b846ed00ac15a234c
10 changes: 2 additions & 8 deletions trunk/drivers/i2c/busses/i2c-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ enum s3c24xx_i2c_state {
};

struct s3c24xx_i2c {
spinlock_t lock;
wait_queue_head_t wait;
unsigned int quirks;
unsigned int suspended:1;
Expand Down Expand Up @@ -541,8 +540,6 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
goto out;
}

spin_lock_irq(&i2c->lock);

i2c->msg = msgs;
i2c->msg_num = num;
i2c->msg_ptr = 0;
Expand All @@ -551,7 +548,6 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,

s3c24xx_i2c_enable_irq(i2c);
s3c24xx_i2c_message_start(i2c, msgs);
spin_unlock_irq(&i2c->lock);

timeout = wait_event_timeout(i2c->wait, i2c->msg_num == 0, HZ * 5);

Expand Down Expand Up @@ -741,7 +737,6 @@ static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb,
unsigned long val, void *data)
{
struct s3c24xx_i2c *i2c = freq_to_i2c(nb);
unsigned long flags;
unsigned int got;
int delta_f;
int ret;
Expand All @@ -755,9 +750,9 @@ static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb,

if ((val == CPUFREQ_POSTCHANGE && delta_f < 0) ||
(val == CPUFREQ_PRECHANGE && delta_f > 0)) {
spin_lock_irqsave(&i2c->lock, flags);
i2c_lock_adapter(&i2c->adap);
ret = s3c24xx_i2c_clockrate(i2c, &got);
spin_unlock_irqrestore(&i2c->lock, flags);
i2c_unlock_adapter(&i2c->adap);

if (ret < 0)
dev_err(i2c->dev, "cannot find frequency\n");
Expand Down Expand Up @@ -962,7 +957,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
i2c->adap.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
i2c->tx_setup = 50;

spin_lock_init(&i2c->lock);
init_waitqueue_head(&i2c->wait);

/* find the clock and enable it */
Expand Down

0 comments on commit c535bd6

Please sign in to comment.