summaryrefslogtreecommitdiff
path: root/v4l/compat.h
AgeCommit message (Collapse)Author
2009-08-23compat.h: Fix compilation breakage with vanilla 2.6.16 to 2.6.19Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4635: warning: implicit declaration of function 'PCI_VDEVICE' /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4635: error: 'BROOKTREE' undeclared here (not in a function) /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4635: error: initializer element is not constant /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4635: error: (near initialization for 'bttv_pci_tbl[0].vendor') /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4636: error: initializer element is not constant /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4636: error: (near initialization for 'bttv_pci_tbl[1].vendor') /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4637: error: initializer element is not constant /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4637: error: (near initialization for 'bttv_pci_tbl[2].vendor') /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4638: error: initializer element is not constant /marune/build/v4l-dvb-master/v4l/bttv-driver.c:4638: error: (near initialization for 'bttv_pci_tbl[3].vendor') Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-20compat.h: implement DIV_ROUND_CLOSESTMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-05Compatibility layer for hrtimer APIMauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> Kernels 2.6.22 to 2.6.24 (inclusive) need some compatibility quirks for the hrtimer API. For older kernels, some required functions were not exported so there's nothing we can do. This means that drivers using the hrtimer infrastructure will no longer work for kernels older than 2.6.22. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23Building system: Improve compatibility for delayed workMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-subdev2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-21merge: http://linuxtv.org/hg/~tap/fixMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-20compat: Fix __fls for certain ARM kernelsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> __fls() has a broken definition for ARM in from v2.6.26-7260-g0c65f45 to v2.6.28-rc6-187-g94fc733. We can fix this by just undef'ing __fls before the compat define. This will let us replace the broken one with our working one. For those kernels where the compat code is triggered and __fls works, we replace the working one with our (identical) working version, which is not a problem. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-06-20Kbuild: make USB_STV06XX compile with RHEL5 kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-09v4l-compat: add I2C_ADDRS macro.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-05-30compat: handle __flsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> __fls() was added for generic code in 2.6.29, existed for just 64-bit arches since 2.6.26 (v2.6.25-5228-g56a6b1e), and was x86-64 only before then. When __fls() doesn't exists we create an inline function that implements it via fls(), which has existed for longer. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-04-30compat: Add DMA_BIT_MASK() macroTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> This macro was added in 2.6.24 as a replacement for things like DMA_32BIT_MASK, DMA_24BIT_MASK, etc. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-04-14compat.h: improve detection for need poll_schedule()Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-14backport commit 758021bfa9ea25c58e62d2f68512628b19502ce7Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: Takashi Iwai <tiwai@suse.de> Date: Mon Jan 12 15:17:09 2009 +0100 drivers/media: Convert to snd_card_create() Convert from snd_card_new() to the new snd_card_create() function. While here, backport also cx231xx-audio upstream changes for using snd_card_create(). kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-09merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-radioMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-06v4l/compat.h: add clamp_valHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-05compat: Add INIT_DELAYED_WORKTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Turn it into INIT_WORK for pre 2.6.20. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-03Drop I2C_M_IGNORE_NAK compatibility bitMauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> I2C_M_IGNORE_NAK is defined since kernel 2.5.54 so we don't need to declare it in the compatibility header. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-03compat: rename struct delayed_work to work_struct on pre-2.6.20Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> In v2.6.19-rc6-118-g52bad64 struct work_struct was changed to be only for non-delayed work and struct delayed_work was created for delayed work. Instead of putting ifdefs in the drivers, we use compat.h to rename delayed_work to work_struct on pre-2.6.20 kernels. This will only be a problem if some driver decides to create identifiers named both work_struct and delayed_work in the same scope. There is one driver that has something named work_struct and none with anything named delayed_work, so I don't think will be a problem for as long as this compat code sticks around. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-01-09backport commit 5f820f648c92a5ecc771a96b3c29aa6e90013bbaMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: Tejun Heo <htejun@gmail.com> poll: allow f_op->poll to sleep f_op->poll is the only vfs operation which is not allowed to sleep. It's because poll and select implementation used task state to synchronize against wake ups, which doesn't have to be the case anymore as wait/wake interface can now use custom wake up functions. The non-sleep restriction can be a bit tricky because ->poll is not called from an atomic context and the result of accidentally sleeping in ->poll only shows up as temporary busy looping when the timing is right or rather wrong. This patch converts poll/select to use custom wake up function and use separate triggered variable to synchronize against wake up events. The only added overhead is an extra function call during wake up and negligible. This patch removes the one non-sleep exception from vfs locking rules and is beneficial to userland filesystem implementations like FUSE, 9p or peculiar fs like spufs as it's very difficult for those to implement non-sleeping poll method. While at it, make the following cosmetic changes to make poll.h and select.c checkpatch friendly. * s/type * symbol/type *symbol/ : three places in poll.h * remove blank line before EXPORT_SYMBOL() : two places in select.c Oleg: spotted missing barrier in poll_schedule_timeout() Davide: spotted missing write barrier in pollwake() kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-06compat.h: Fix a small error at the compat codeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> CC: Nicola Soranzo <nsoranzo@tiscali.it>
2009-01-06fix compile with Fedora 10 kernelMauro Carvalho Chehab
From: Nicola Soranzo <nsoranzo@tiscali.it> Fix compile error about ioremap_nocache with kernel 2.6.27.9 shipped by Fedora 10. Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30Fix compilation against RHEL kernelMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30v4l: fix compile errors for older kernelsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-30Add compat support for usb_endpoint_type()Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> While here, make sure that config-compat.h is rebuild if the script change. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30Fix compilation for kernels older than 2.6.28Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-03backport commit 0eade1f930fa3ba6461b34baf3ed8fa7c4abc40fMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: Wang Chen <wangchen@cn.fujitsu.com> dvb: Kill directly reference of netdev->priv Simply replace netdev->priv with netdev_priv(). kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-20v4l2-dev: use the release callback from device instead of cdevHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Instead of relying on the cdev release callback we should rely on the release callback from the device struct. This requires that we use get_device/put_device to do proper refcounting. In order to do this safely v4l2-dev.c now sets up its own file_operations that call out to the driver's ops. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-11-25fix boards for kernels with algo_controlMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> changeset 4ecae6da8244 removed algo_control from i2c drivers. However, on older kernels, a dummy function to implement algo_control is required, otherwise, an OOPS is generated. This patch adds a backport for all i2c drivers that defines an i2c_algorithm, except for cafe_ccic, since OLPC hardware only works for kernels newer than 2.6.19. Some of the backported drivers would need also extra changes to work with older kernels, as specified on v4l/versions.txt. Yet, I decided to add the backport for those drivers also, since the lack of algo_control doesn't generate any compilation error, but it is enough to break the driver. So, better to all for all boards than to allow compiling a kernel backported that just generates OOPS. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-22Improve compatibility with RHEL kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20compat.h: fix uninitialized_var macroHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-11-12merge: http://linuxtv.org/hg/~pinchartl/uvcvideoMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11uvcvideo: Enable compilation on kernels older than 2.6.22Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The uvcvideo driver makes use of the usb_endpoint_* functions as well as the list_first_entry and uninitialized_var macros. Add them to v4l/compat.h and update the driver with kernel version-based conditional compilation sections. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-11-11Backport a few minor changes from upstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-06v4l: fix dev_set_name compiler errors for kernels < 2.6.26Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-24Fix compilation with RHEL 5.2 kernelMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> RHEL 5 already declares bool. Still, there are some warnings that probably indicate that something else needs to be done for the code to work with RHEL5. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03backport commit aa7a7fb3990ffc74945494cbd2fc6e920825ee2cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: David Woodhouse <David.Woodhouse@intel.com> Define and use PCI_DEVICE_ID_MARVELL_88ALP01_CCIC for CAFÉ camera driver Also, stop looking at the NAND controller (0x4100) and checking the device class. For a while during development, all three functions on the chip had the same ID. We made them fix that fairly promptly, and we can forget about it now. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12Fix build breakage with kernels lower than 2.6.28Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This patch fixes compilation for older kernels. However, due to -alsa changes on saa7134-alsa and snd-bt878, I'm not sure if this is enough for it to really work. I suspect that something else may be needed for they to work with earlier versions. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-08-30compat: add current_uid define to fix compile errors on kernels < 2.6.27Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-22compat.h: add DIV_ROUND_UP for kernels <= 2.6.18Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26Fix compat for stkcamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-18videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernelsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17videodev/dabusb/dvbdev: fix 2.6.16 compilationHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> struct file_operations was made const in 2.6.17. Cast const away when compiling under 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-14sms1xxx: fix compat for kernel 2.6.23 and earlierMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.10Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 2 removes support for kernels < 2.6.10. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-28Fix s2255drv compilation against older kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> As reported by Hermann Pitton: CC [M] /mnt/xfer/mercurial/v4l-dvb-head/v4l-dvb/v4l/s2255drv.o s2255drv.c: In function 'vidioc_querycap': s2255drv.c:809: error: implicit declaration of function 'dev_name' s2255drv.c:809: warning: passing argument 2 of 'strlcpy' makes pointer from integer without a cast Tested with kernel 2.6.25.6 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-28Fix compat with older kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-10Fix compilation with kernel 2.6.25Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>