make vfree() safe to call from interrupt contexts

A bunch of RCU callbacks want to be able to do vfree() and end up with
rather kludgy schemes.  Just let vfree() do the right thing - put the
victim on llist and schedule actual __vunmap() via schedule_work(), so
that it runs from non-interrupt context.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
powerpc/512x: add ifm ac14xx board

Add dts file for ac14xx board and its board compatible
string to the generic mpc512x board match list.
Also add phandle to the dma DT node since there is a change
(for MPC5121 SDHC DMA support) merged via linux-mmc tree
with reference to the dma controller node in the sdhc node.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
cx25821: sanitize cx25821_get_audio_data() a bit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
cx25821: sanitize cx25821_openfile_audio() a bit...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[media] cx25821: do not expose broken video output streams

The cx25821 driver has support for one audio output channel and two video
output channels.
This is implemented in a very ugly and very evil way through a custom ioctl
that passes the filename of a file containing the video data, which is then
read by the driver itself using vfs.
There are a number of problems with this:
1) it's very ugly and very evil (I can't say that often enough).
2) V4L2 supports video output, so why not use that?
3) it's very buggy, closing the filehandle through which you passed the ioctl
   will oops the kernel.
4) it's a nasty security leak since this allows you to load any file in the
   system as a video or audio source, so in theory you can output /etc/passwd
   to audio or video out and record & decode it on another device.
Because of all these issues we no longer register those output video nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: the audio channel was registered as a video node

Skip the audio channel when registering the video nodes. This fixes a bug
where that incorrectly registered 'video' node was never unregistered.
Note: this bug only surfaces if the video output nodes are enabled again
after the previous patch disabled them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
iwlwifi: mvm: remove TODO which has been addressed

Chain noise is done in the firmware and Bluetooth Coexistence
is implemented now.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iwlwifi: mvm: fix first_antenna

first_antenna is supposed to return the first antenna as a
0-based bitmap: ANT_A is BIT(0), ANT_B is BIT(1), etc...
Since ffs is 1 based (ffs(BIT(0)) = 1), then we had an
off-by-one bug:
BIT(ffs(ANT_A)) = BIT(ffs(BIT(0))) = BIT(1) = ANT_B.
So what we really want is:
BIT(ffs(ANT_A) - 1) = BIT(ffs(BIT(0)) - 1) = BIT(0) = ANT_A.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iwlwifi: mvm: change TX/RX AM-to-PSM transition time for LP mode

Recently in low power (LP) mode FW moved from active to power save mode
after TX/RX completion faster than in balanced power mode (BPS).
Change AM-to-PSM transition time so that it will be the same as for BPS.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[media] cx25821: fix compiler warning

drivers/media/pci/cx25821/cx25821-video.c: In function ‘cx25821_video_register’:
drivers/media/pci/cx25821/cx25821-video.c:518:1: warning: the frame size of 1600 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Fixed by just making the struct video_device template static const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: remove bogus radio/vbi/'video-ioctl' support

This device does not support radio or vbi, so remove anything referring
to that.
In addition, the driver created an 'video ioctl' node, which was unused and
was effectively identical to the first video node.
This bogus video node is now removed, leaving us with 8 video capture nodes
and 2 video output nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: remove unused fields, ioctls

Do some spring cleaning:
- there are no board defines with tuners, so remove bogus tuner support.
- tv standard handling has nothing to do with tuners, so keep that.
- replace the deprecated current_norm by g_std.
- querystd isn't implemented, so remove the ioctl.
- remove a bunch of unused fields in cx25821.h

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: fix log_status, querycap

log_status shouldn't print LOG STATUS lines, the core does that already.
Fix querycap version number and add device_caps support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: make cx25821_sram_channels const

And get rid of the channel0-11 external pointers and two more unused fields
in cx25821.h.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: remove unnecessary global devlist

This device list is not necessary. The kernel already has all that information,
so just use that instead.
Also remove a bogus refcount and some dead 'private_free' code in the alsa driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: s_input didn't check for invalid input

The s_input implementation allowed input 1 even if that didn't exist.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: make lots of externals static

A lot of functions and variables were external when they really can be
declared as static.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: remove cropping ioctls

This driver does not implement cropping, so remove the cropping ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: remove bogus dependencies

This driver doesn't use DVB, RC, cx25840 or tveeprom.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx25821: embed video_device, clean up some kernel log spam

Embed the video_device struct instead of allocating it.
Remove some of the annoying and ugly kernel messages shown during
loading and unloading of the module.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>