diff options
-rw-r--r-- | README.patches | 9 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.h | 9 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/vp7045.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/dvb-pll.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-av.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.h | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/v4l2-int-device.c | 3 |
8 files changed, 29 insertions, 12 deletions
diff --git a/README.patches b/README.patches index 41b237476..87fe57be6 100644 --- a/README.patches +++ b/README.patches @@ -311,7 +311,7 @@ j) By submitting a patch to the subsystem maintainer, either via email assumed as GPLv2 only. 5. Knowing about newer patches committed at master hg repository - ============================================================ + ============================================================= There's a patchbomb script at linuxtv.org that will send one copy of each patch applied to -hg tree to: @@ -409,10 +409,13 @@ e. People will eventually comment about the patch. In this case, f. If the patch is fixing an existing maintained driver, the low-level driver maintainer will apply to his tree, and at some later - time, ask the subsystem maintainer to pull it. + time, ask the subsystem maintainer to pull it. It is a good idea to + send the patch to the maintainer C/C the mailing list for him to know + that you're expecting him to forward the patch. g. If it is a newer driver (not yet in one of the development trees), - please copy the subsystem maintainer. + please send the patch to the subsystem maintainer, C/C the proper + mailing lists. 8. Identifying regressions with Mercurial ====================================== diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 08e92187d..a05f4267a 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -143,7 +143,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) dprintk ("%s\n", __FUNCTION__); - if (down_interruptible (&events->sem)) + if (mutex_lock_interruptible (&events->mtx)) return; wp = (events->eventw + 1) % MAX_EVENT; @@ -164,7 +164,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) events->eventw = wp; - up (&events->sem); + mutex_unlock(&events->mtx); e->status = status; @@ -202,7 +202,7 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe, return ret; } - if (down_interruptible (&events->sem)) + if (mutex_lock_interruptible (&events->mtx)) return -ERESTARTSYS; memcpy (event, &events->events[events->eventr], @@ -210,7 +210,7 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe, events->eventr = (events->eventr + 1) % MAX_EVENT; - up (&events->sem); + mutex_unlock(&events->mtx); return 0; } @@ -1131,7 +1131,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb, init_MUTEX (&fepriv->sem); init_waitqueue_head (&fepriv->wait_queue); init_waitqueue_head (&fepriv->events.wait_queue); - init_MUTEX (&fepriv->events.sem); + mutex_init(&fepriv->events.mtx); fe->dvb = dvb; fepriv->inversion = INVERSION_OFF; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h index a770a87b9..275ae622f 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -35,6 +35,9 @@ #include <linux/module.h> #include <linux/errno.h> #include <linux/delay.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#include <linux/mutex.h> +#endif #include <linux/dvb/frontend.h> @@ -142,7 +145,11 @@ struct dvb_fe_events { int eventr; int overflow; wait_queue_head_t wait_queue; - struct semaphore sem; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex mtx; +#else + struct semaphore mtx; +#endif }; struct dvb_frontend { diff --git a/linux/drivers/media/dvb/dvb-usb/vp7045.c b/linux/drivers/media/dvb/dvb-usb/vp7045.c index 0ddeb3fce..e92f9aedf 100644 --- a/linux/drivers/media/dvb/dvb-usb/vp7045.c +++ b/linux/drivers/media/dvb/dvb-usb/vp7045.c @@ -167,7 +167,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state) return 0; } - for (i = 0; i < sizeof(vp7045_rc_keys)/sizeof(struct dvb_usb_rc_key); i++) + for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++) if (vp7045_rc_keys[i].data == key) { *state = REMOTE_KEY_PRESSED; *event = vp7045_rc_keys[i].event; diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c index 0c0b94767..ca99e439c 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.c +++ b/linux/drivers/media/dvb/frontends/dvb-pll.c @@ -501,7 +501,7 @@ static struct dvb_pll_desc dvb_pll_opera1 = { /* Philips FCV1236D */ -struct dvb_pll_desc dvb_pll_fcv1236d = { +static struct dvb_pll_desc dvb_pll_fcv1236d = { /* Bit_0: RF Input select * Bit_1: 0=digital, 1=analog */ diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 0aee7a13a..3439c9864 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -1232,7 +1232,7 @@ static struct saa7146_ext_vv vv_data = { .capabilities = 0, // perhaps later: V4L2_CAP_VBI_CAPTURE, but that need tweaking with the saa7113 .flags = 0, .stds = &standard[0], - .num_stds = sizeof(standard) / sizeof(struct saa7146_standard), + .num_stds = ARRAY_SIZE(standard), .ioctls = &ioctls[0], .ioctl = av_ioctl, }; diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h index 7d69337ee..f4fe889d9 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.h +++ b/linux/drivers/media/video/ivtv/ivtv-driver.h @@ -729,7 +729,11 @@ struct ivtv { int search_pack_header; spinlock_t dma_reg_lock; /* lock access to DMA engine registers */ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex serialize_lock; /* lock used to serialize starting streams */ +#else + struct semaphore serialize_lock; /* lock used to serialize starting streams */ +#endif /* User based DMA for OSD */ struct ivtv_user_dma udma; diff --git a/linux/drivers/media/video/v4l2-int-device.c b/linux/drivers/media/video/v4l2-int-device.c index aa2a81563..9d76d1b90 100644 --- a/linux/drivers/media/video/v4l2-int-device.c +++ b/linux/drivers/media/video/v4l2-int-device.c @@ -28,6 +28,7 @@ #include <linux/string.h> #include <media/v4l2-int-device.h> +#include "compat.h" static DEFINE_MUTEX(mutex); static LIST_HEAD(int_list); @@ -101,6 +102,7 @@ int v4l2_int_device_register(struct v4l2_int_device *d) return 0; } +EXPORT_SYMBOL_GPL(v4l2_int_device_register); void v4l2_int_device_unregister(struct v4l2_int_device *d) { @@ -114,6 +116,7 @@ void v4l2_int_device_unregister(struct v4l2_int_device *d) } mutex_unlock(&mutex); } +EXPORT_SYMBOL_GPL(v4l2_int_device_unregister); /* Adapted from search_extable in extable.c. */ static v4l2_int_ioctl_func *find_ioctl(struct v4l2_int_slave *slave, int cmd, |