From be80b76533c8db5af8ef3464c84d56c45767ed60 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 6 Feb 2006 13:59:37 -0200 Subject: sem2mutex: drivers/media/, #2 Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/dvb-usb/dvb-usb.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb.h') diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h index 5e5d21ad9..bdf596c42 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -12,6 +12,10 @@ #include #include #include +#include "compat.h" +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#include +#endif #include "dvb_frontend.h" #include "dvb_demux.h" @@ -227,8 +231,8 @@ struct dvb_usb_properties { * @feedcount: number of reqested feeds (used for streaming-activation) * @pid_filtering: is hardware pid_filtering used or not. * - * @usb_sem: semaphore of USB control messages (reading needs two messages) - * @i2c_sem: semaphore for i2c-transfers + * @usb_mutex: semaphore of USB control messages (reading needs two messages) + * @i2c_mutex: semaphore for i2c-transfers * * @i2c_adap: device's i2c_adapter if it uses I2CoverUSB * @pll_addr: I2C address of the tuner for programming @@ -283,10 +287,18 @@ struct dvb_usb_device { int pid_filtering; /* locking */ - struct semaphore usb_sem; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex usb_mutex; +#else + struct semaphore usb_mutex; +#endif /* i2c */ - struct semaphore i2c_sem; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex i2c_mutex; +#else + struct semaphore i2c_mutex; +#endif struct i2c_adapter i2c_adap; /* tuner programming information */ -- cgit v1.2.3