s2250: Mutex function usage.
PATCH 2/5 s2250: Mutex function usage.
From: Pete Eberlein <[email protected]>
Fix mutex function usage, which was overlooked in a previous patch.
Priority: normal
linux/drivers/staging/go7007/s2250-board.c +2 -2
@@ -261,7 +261,7 @@memset (buf,0xcd ,6 ); usb = go->hpi_context; -if (down_interruptible (&usb->i2c_lock) !=0 ) { +if (mutex_lock_interruptible (&usb->i2c_lock) !=0 ) {printk (KERN_INFO "i2c lock failed\n" );kfree (buf);return -EINTR ;
@@ -270,7 +270,7 @@kfree (buf);return -EFAULT ; } -up (&usb->i2c_lock); +mutex_unlock (&usb->i2c_lock); *val = (buf[0 ] <<8 ) | buf[1 ];kfree (buf);
Quoted 31 lines · On Tuesday 10 November 2009 20:21:31 Pete Eberlein wrote:
From: Pete Eberlein <[email protected]>
Fix mutex function usage, which was overlooked in a previous patch.
Priority: normal
Signed-off-by Pete Eberlein <[email protected]>diff -r
a603ad1e6a1c-r99e4a0cf6788linux/drivers/staging/go7007/s2250-board.clinux/drivers/staging/go7007/s2250-board.c +2
-3@@ -261,7 +261,7 @@memset (buf,0xcd ,6 ); usb = go->hpi_context; -if (down_interruptible (&usb->i2c_lock) !=0 ) { +if (mutex_lock_interruptible (&usb->i2c_lock) !=0 ) {printk (KERN_INFO "i2c lock failed\n" );kfree (buf);return -EINTR ;@@ -270,7 +270,7 @@kfree (buf);return -EFAULT ; } -up (&usb->i2c_lock); +mutex_unlock (&usb->i2c_lock); *val = (buf[0 ] <<8 ) | buf[1 ];kfree (buf); --
Quoted 5 lines
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks good. I'll prepare a pull request for this one and ask Mauro to get this fix into 2.6.32-rcX as well since it produces a compiler warning.
I'll also ask Mauro to get the missing drivers/staging/go7007/s2250-loader.h into 2.6.32-rcX: it apparently fell on the floor when the go7007 driver was updated in 2.6.32.
Regards,
Hans
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
Quoted 41 lines · On Sunday 15 November 2009 12:23:13 Hans Verkuil wrote:
Quoted 31 lines · On Tuesday 10 November 2009 20:21:31 Pete Eberlein wrote:
From: Pete Eberlein <[email protected]>
Fix mutex function usage, which was overlooked in a previous patch.
Priority: normal
Signed-off-by Pete Eberlein <[email protected]>diff -r
a603ad1e6a1c-r99e4a0cf6788linux/drivers/staging/go7007/s2250-board.clinux/drivers/staging/go7007/s2250-board.c +2
-3@@ -261,7 +261,7 @@memset (buf,0xcd ,6 ); usb = go->hpi_context; -if (down_interruptible (&usb->i2c_lock) !=0 ) { +if (mutex_lock_interruptible (&usb->i2c_lock) !=0 ) {printk (KERN_INFO "i2c lock failed\n" );kfree (buf);return -EINTR ;@@ -270,7 +270,7 @@kfree (buf);return -EFAULT ; } -up (&usb->i2c_lock); +mutex_unlock (&usb->i2c_lock); *val = (buf[0 ] <<8 ) | buf[1 ];kfree (buf); --Quoted 5 lines
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlLooks good. I'll prepare a pull request for this one and ask Mauro to get this fix into 2.6.32-rcX as well since it produces a compiler warning.
Quoted 3 lines
I'll also ask Mauro to get the missing
drivers/staging/go7007/s2250-loader.hinto 2.6.32-rcX: it apparently fell on the floor when the go7007 driver was updated in 2.6.32.
A quick follow-up: I noticed that the third patch actually removed the loader header. However, this patch series (except for the second patch) won't go to 2.6.32 but to 2.6.33. So 2.6.32 still needs that header.
Regards,
Hans
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom