lkml.org 
[lkml]   [2007]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 21/47] New version of CRISv32 I2C driver.
On Fri, 30 Nov 2007 15:54:01 +0100 Jesper Nilsson <jesper.nilsson@axis.com> wrote:

> +int
> +i2c_write(unsigned char theSlave, void *data, size_t nbytes)
> +{
> + int error, cntr = 3;
> + unsigned char bytes_wrote = 0;
> + unsigned char value;
> + unsigned long flags;
> +
> + spin_lock(&i2c_lock);
> +
> + do {
> + error = 0;
> + /*
> + * we don't like to be interrupted
> + */
> + local_irq_save(flags);
> +
> + i2c_start();
> + /*

Well if you _are_ interrupted prior to the local_irq_save() you'll deadlock
on i2c_lock?



\
 
 \ /
  Last update: 2007-12-12 12:21    [W:0.169 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site