diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-02-27 21:06:36 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-02-27 21:06:36 -0500 |
commit | 47eb0997ae6ced96654a3f5a82cdb885d5f8f401 (patch) | |
tree | 28bb2ade701c7515b02c16a6779f0f2842fce727 | |
parent | 91df4049ebb4764105976c5affe3e751c55c1b61 (diff) | |
download | mediapointer-dvb-s2-47eb0997ae6ced96654a3f5a82cdb885d5f8f401.tar.gz mediapointer-dvb-s2-47eb0997ae6ced96654a3f5a82cdb885d5f8f401.tar.bz2 |
ivtv: fix semaphore / mutex compat for kernels 2.6.15 and earlier
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h index 389eded7f..f62e62b79 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.h +++ b/linux/drivers/media/video/ivtv/ivtv-driver.h @@ -53,7 +53,9 @@ #include <linux/byteorder/swab.h> #include <linux/pagemap.h> #include <linux/workqueue.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> +#endif #include <asm/uaccess.h> #include <asm/system.h> @@ -413,7 +415,11 @@ struct ivtv_SG_element { }; struct ivtv_user_dma { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; +#else + struct semaphore lock; +#endif int page_count; struct page *map[IVTV_DMA_SG_OSD_ENT]; @@ -778,7 +784,11 @@ struct ivtv { struct i2c_adapter i2c_adap; struct i2c_algo_bit_data i2c_algo; struct i2c_client i2c_client; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex i2c_bus_lock; +#else + struct semaphore i2c_bus_lock; +#endif int i2c_state; struct i2c_client *i2c_clients[I2C_CLIENTS_MAX]; |