From 47eb0997ae6ced96654a3f5a82cdb885d5f8f401 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 27 Feb 2007 21:06:36 -0500 Subject: ivtv: fix semaphore / mutex compat for kernels 2.6.15 and earlier From: Michael Krufky Signed-off-by: Michael Krufky --- linux/drivers/media/video/ivtv/ivtv-driver.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux') 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 #include #include +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include +#endif #include #include @@ -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]; -- cgit v1.2.3