Make it more similar to the genirq version:
- Remove lock (unused as we don't do SMP anyway),
- Prepend methods with irq_,
- Make irq_startup() return unsigned int.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
ide-{cd,floppy,tape}: Do not include <linux/irq.h>
The top of <linux/irq.h> has this comment:
* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmk
Remove inclusion of <linux/irq.h>, to prevent the following compile error
from happening soon:
| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’
| include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’
commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig
options to improve mmu/non-mmu selections") accidentally dropped the DIO
bus config option. Re-add it to the "Bus support" section.
commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig
options to improve mmu/non-mmu selections") accidentally dropped the ARAnyM
config options. Re-add them to the "Platform devices" section.
Linus Torvalds [Tue, 8 Nov 2011 20:50:54 +0000 (12:50 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
hwspinlock/u8500: fix build error due to undefined label
hwspinlock: Don't return a value in __hwspin_unlock
Helmut Schaa [Tue, 8 Nov 2011 13:01:13 +0000 (14:01 +0100)]
ath: Fix NULL ptr dereference in ath_reg_apply_world_flags
This happens with devices using a regulatory domain 0x68 that are only
5Ghz capable because ath_reg_apply_active_scan_flags assumes that we
always have a 2,4Ghz band.
Steffen Klassert [Tue, 11 Oct 2011 01:12:02 +0000 (01:12 +0000)]
ipv4: Fix inetpeer expire time information
As we update the learned pmtu informations on demand, we might
report a nagative expiration time value to userspace if the
pmtu informations are already expired and we have not send a
packet to that inetpeer after expiration. With this patch we
send a expire time of null to userspace after expiration
until the next packet is send to that inetpeer.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Merge branch 'poll-pwc' of /home/v4l/v4l/patchwork
* 'poll-pwc' of /home/v4l/v4l/patchwork:
gspca_pac207: Raise max exposure + various autogain setting tweaks
pwc: read new preset values when changing awb control to a preset
pwc: poll(): Check that the device has not beem claimed for streaming already
pwc: rework locking
pwc: Make auto white balance speed and delay available as v4l2 controls
pwc: properly mark device_hint as unused in all probe error paths
pwc: Add support for control events
vivi: let vb2_poll handle events.
videobuf2-core: also test for pending events.
videobuf: only start streaming in poll() if so requested by the poll mask.
videobuf2: only start streaming in poll() if so requested by the poll mask.
ivtv: only start streaming in poll() if polling for input.
poll: add poll_requested_events() function
Hans de Goede [Sun, 9 Oct 2011 20:22:00 +0000 (22:22 +0200)]
pwc: read new preset values when changing awb control to a preset
So that events get generated for the new red + blue bal values when switching
to a preset. This allows apps to solely rely on events instead of needing
to do a query + g_ctrl on all controls when a control with the update flag
set is gets set or gets an event.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sun, 9 Oct 2011 13:28:27 +0000 (15:28 +0200)]
pwc: poll(): Check that the device has not beem claimed for streaming already
Some apps which use read() start the streaming through a call to poll(),
this means that if another app has already claimed the device for streaming
(through for example a s_fmt, or a reqbufs), that the poll should fail instead
of getting passed through to vb2_poll.
We only check for this when the app is polling for reads, so that ctrl events
still work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sun, 9 Oct 2011 12:16:46 +0000 (14:16 +0200)]
pwc: rework locking
While testing gtk-v4l's new ctrl event code, I hit the following deadlock
in the pwc driver:
Thread 1:
-Does a VIDIOC_G_CTRL
-video2_ioctl takes the modlock
-video2_ioctl calls v4l2_g_ctrl
-v4l2_g_ctrl takes the ctrl_handler lock
-v4l2_g_ctrl calls pwc_g_volatile_ctrl
-pwc_g_volatile_ctrl releases the modlock as the usb transfer can take a
significant amount of time and we don't want to block DQBUF / QBUF too long
Thread 2:
-Does a VIDIOC_FOO_CTRL
-video2_ioctl takes the modlock
-video2_ioctl calls v4l2_foo_ctrl
-v4l2_foo_ctrl blocks while trying to take the ctrl_handler lock
Thread 1:
-Blocks while trying to re-take the modlock, as its caller will eventually
unlock that
Now we have thread 1 waiting for the modlock while holding the ctrl_handler
lock and thread 2 waiting for the ctrl_handler lock while holding the
modlock -> deadlock.
Conclusion:
1) We cannot unlock modlock from pwc_s_ctrl / pwc_g_volatile_ctrl,
but this can cause QBUF / DQBUF to block for up to a full second
2) After evaluating various option I came to the conclusion that pwc should
stop using the v4l2 core locking, and instead do its own locking
Thus this patch stops pwc using the v4l2 core locking, and replaces that with
it doing its own locking where necessary.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans Verkuil [Thu, 29 Sep 2011 07:30:21 +0000 (09:30 +0200)]
poll: add poll_requested_events() function
In some cases the poll() implementation in a driver has to do different
things depending on the events the caller wants to poll for. An example is
when a driver needs to start a DMA engine if the caller polls for POLLIN,
but doesn't want to do that if POLLIN is not requested but instead only
POLLOUT or POLLPRI is requested. This is something that can happen in the
video4linux subsystem.
Unfortunately, the current epoll/poll/select implementation doesn't provide
that information reliably. The poll_table_struct does have it: it has a key
field with the event mask. But once a poll() call matches one or more bits
of that mask any following poll() calls are passed a NULL poll_table_struct
pointer.
The solution is to set the qproc field to NULL in poll_table_struct once
poll() matches the events, not the poll_table_struct pointer itself. That
way drivers can obtain the mask through a new poll_requested_events inline.
The poll_table_struct can still be NULL since some kernel code calls it
internally (netfs_state_poll() in ./drivers/staging/pohmelfs/netfs.h). In
that case poll_requested_events() returns ~0 (i.e. all events).
Since eventpoll always leaves the key field at ~0 instead of using the
requested events mask, that source was changed as well to properly fill in
the key field.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Jonathan Corbet <corbet@lwn.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
oftedal [Mon, 7 Nov 2011 11:47:53 +0000 (11:47 +0000)]
sunhme: Allow usage on SBI based SBus systems
To prevent the SBus driver for Sun Happy Meal cards from being loaded for
PCI cards utilizing the same chipset, a filter was added to the probe
function in commit 0b492fce3d72d982a7981905f85484a1e1ba7fde.
The filter was implemented by checking the name of the parent node in
the OF tree. This patch extends this filter, so that the driver will
load on SBus systems that are based upon SBI SBus Bridges.
Signed-off-by: Kjetil Oftedal <oftedal@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* /home/v4l/v4l/patchwork: (62 commits)
[media] V4L menu: add submenu for platform devices
[media] cx88: fix menu level for the VP-3054 module
[media] V4L menu: move all PCI(e) devices to their own submenu
[media] V4L menu: reorganize the radio menu
[media] V4L menu: remove duplicate USB dependency
[media] V4L menu: move all platform drivers to the bottom of the menu
[media] V4L menu: remove the EXPERIMENTAL tag from vino and c-qcam
[media] V4L menu: move ISA and parport drivers into their own submenu
[media] V4L menu: move USB drivers section to the top
[media] usbvision: Drop broken 10-bit I2C address support
[media] Support for Sveon STV22 (IT9137)
[media] staging: as102: Eliminate as10x_handle_t alias
[media] staging: as102: Define device name string pointers constant
[media] staging: as102: Move variable declarations to the header
[media] staging: as102: Use linux/uaccess.h instead of asm/uaccess.h
[media] staging: as102: Remove linkage specifiers for C++
[media] staging: as102: Replace printk(KERN_<LEVEL> witk pr_<level>
[media] staging: as102: Whitespace and indentation cleanup
[media] staging: as102: Fix the dvb device registration error path
[media] staging: as102: Replace pragma(pack) with attribute __packed
...