Commit graph

168440 commits

Author SHA1 Message Date
Laurent Pinchart 3d5a71ef32 [media] omap3isp: Remove unneeded memset after kzalloc
kzalloc initializes the memory it allocates to 0, there's no need for an
explicit memset.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:48:13 -02:00
Laurent Pinchart 3fdfedaaa7 [media] omap3isp: preview: Lower the crop margins
The preview engine includes filters that consume columns and lines as
part of their operation, thus resulting in a cropped image. To allow
turning those filters on/off during streaming without affecting the
output image size, the driver adds additional cropping to make the total
number of cropped columns and lines constant regardless of which filters
are enabled.
This process needlessly includes the CFA filter, as whether the filter
is enabled only depends on the sink pad format, which can't change
during streaming.
Exclude the CFA filter from the preview engine margins.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:45:29 -02:00
Oliver Neukum a82a45f653 [media] uvcvideo: Fix race of open and suspend in error case
Ming Lei reported:
IMO, there is a minor fault in the error handling path of
uvc_status_start() inside uvc_v4l2_open(), and the 'users' count should
have been decreased before usb_autopm_put_interface(). In theory, a [URB
resubmission] warning can be triggered when the device is opened just
between usb_autopm_put_interface() and atomic_dec(&stream->dev->users).
The fix is trivial.

Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:32:21 -02:00
Ezequiel Garcia 8c0d44e250 [media] uvcvideo: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:31:36 -02:00
Wei Yongjun 5d97046a37 [media] davinci: vpbe: fix missing unlock on error in vpbe_initialize()
Add the missing unlock on the error handling path in function
vpbe_initialize().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:26:08 -02:00
Lad, Prabhakar b9f1fbcd0e [media] davinci: dm355: Fix uninitialized variable compiler warnings
drivers/media/platform/davinci/dm355_ccdc.c:593:9: warning: ‘val1’ may be
used uninitialized in this function [-Wuninitialized]
drivers/media/platform/davinci/dm355_ccdc.c:560:6: note: ‘val1’ was declared here
This is a false positive but the compiler has no way to know about it,
so initialize the variable to 0.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:09:55 -02:00
Lad, Prabhakar c7a857a09f [media] adv7343: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:54 -02:00
Lad, Prabhakar 08754d3185 [media] tvp514x: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:25 -02:00
Lad, Prabhakar f3e8e4f1c0 [media] tvp7002: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:04 -02:00
Lad, Prabhakar d41d81983a [media] ths7303: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:05:06 -02:00
Paul Bolle b4c13d3df1 [media] saa7164: silence GCC warnings
Compiling the saa7164 driver without CONFIG_VIDEO_ADV_DEBUG set triggers
these GCC warnings:
    drivers/media/pci/saa7164/saa7164-encoder.c:1301:12: warning: ‘saa7164_g_register’ defined but not used [-Wunused-function]
    drivers/media/pci/saa7164/saa7164-encoder.c:1314:12: warning: ‘saa7164_s_register’ defined but not used [-Wunused-function]
Silence these warnings by wrapping these two functions in an "#ifdef
CONFIG_VIDEO_ADV_DEBUG" and "#endif" pair.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 13:50:14 -02:00
Alexandre Lissy 24dec5dabf [media] imon: fix Knob event interpretation issues on ARM
Events for the iMon Knob pad where not correctly interpreted on ARM,
resulting in buggy mouse movements (cursor going straight out of the
screen), key pad only generating KEY_RIGHT and KEY_DOWN events.
A reproducer is:
int main(int argc, char ** argv)
{
        char rel_x = 0x00; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        rel_x = 0x0f; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        rel_x |= ~0x0f; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        return 0;
}
(running on x86 or amd64)
$ ./test
rel_x:0 @test.c:6
rel_x:15 @test.c:7
rel_x:-1 @test.c:8
(running on armv6)
rel_x:0 @test.c:6
rel_x:15 @test.c:7
rel_x:255 @test.c:8
Forcing the rel_x and rel_y variables as signed char fixes the issue.

Reference: http://www.arm.linux.org.uk/docs/faqs/signedchar.php

Signed-off-by: Alexandre Lissy <alexandrelissy@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-01 07:13:59 -02:00
Mauro Carvalho Chehab a32f7d1ad3 Merge branch 'v4l_for_linus' into staging/for_v3.9
* v4l_for_linus: (464 commits)
  [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
  [media] uvcvideo: Cleanup leftovers of partial revert
  [media] uvcvideo: Return -EACCES when trying to set a read-only control
  Linux 3.8-rc3
  mm: reinstante dropped pmd_trans_splitting() check
  cred: Remove tgcred pointer from struct cred
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  drm/prime: drop reference on imported dma-buf come from gem
  xen/netfront: improve truesize tracking
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  sctp: fix Kconfig bug in default cookie hmac selection
  EDAC: Cleanup device deregistering path
  ...

Conflicts:
	drivers/media/pci/dm1105/dm1105.c
	drivers/media/platform/soc_camera/mx2_camera.c
2013-01-24 18:49:18 -02:00
Andreas Regel 6b9e50c463 [media] stv090x: On STV0903 do not set registers of the second path
Sometimes there is a problem when trying to access the non-existing registers
of the second demodulator path on the STV0903.

This change removes the calls in case the driver is used on a STV0903.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 18:31:00 -02:00
Mauro Carvalho Chehab f67102c49a [media] mb86a20s: remove global BER/PER counters if per-layer counters vanish
If, for any reason, all per-layers counters stop, remove the
corresponding global counter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:28:32 -02:00
Mauro Carvalho Chehab d9b6f08a7f [media] mb86a20s: add a logic for post-BER measurement
The logic here is similar to the preBER.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:28:14 -02:00
Mauro Carvalho Chehab 313cf4efa4 [media] mb86a20s: fix the PER reset logic
The logic that resets the device is wrong. It should be resetting
just the layer that got read. Also, stop is needed before updating
the counters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:27:16 -02:00
Mauro Carvalho Chehab ad0abbf118 [media] mb86a20s: some fixes at preBER logic
The logic that resets the device is wrong. It should be resetting
just the layer that got read. Also, stop is needed before updating
the counters.
While there, rename it, as we'll soon introduce a postBER logic
there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:26:55 -02:00
Mauro Carvalho Chehab 593ae89a3f [media] mb86a20s: add block count measures (PER/UCB)
Add both per-layer and global block error count and block count,
for PER and UCB measurements.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:24:59 -02:00
Mauro Carvalho Chehab 94a93e5f85 [media] dvb_frontend: print a msg if a property doesn't exist
If userspace calls a property that doesn't exist, it currently
just returns -EINVAL. However, this is more likely a problem at
the userspace application, calling it with a non-existing property.
So, add a debug message to help tracking it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:57 -02:00
Mauro Carvalho Chehab 25188bd0e6 [media] mb86a20s: add CNR measurement
Add Signal/Noise ratio measurement. On this device, a global measure
is taken by the demod. It also provides per-layer CNR measurements,
based on Modulation Error measures (MER).

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:49 -02:00
Mauro Carvalho Chehab d01a8ee37a [media] mb86a20s: improve bit error count for BER
Do a better job on setting the bit error counters, in order to
have all layer measures to happen in a little less than one
second.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:42 -02:00
Mauro Carvalho Chehab 149d518ad0 [media] mb86a20s: add BER measurement
Add the methods to read bit error/bit count measurements from
mb86a20s. On ISDB-T devices, those reads are done per layer.
However, as userspace applications may not be aware of that,
add a global measure that will sum the bit errors and bit
counts for each layer, storing them into a global value.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:35 -02:00
Mauro Carvalho Chehab 09b6d21e10 [media] mb86a20s: calculate statistics at .read_status()
Instead of providing separate callbacks to read the several FE
stats properties, the better seems to use just one method that will:
    - Read lock status;
    - Read signal strength;
    - if locked, get TMCC data;
    - if locked, get DVB statistics.
As the DVB frontend thread will call this read_status callback
on every 3 seconds, and userspace can even call it earlier,
all stats data and layers layout will be updated together if
available, with is a good thing.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:27 -02:00
Mauro Carvalho Chehab 7cd4ece58f [media] dvb: the core logic to handle the DVBv5 QoS properties
Add the logic to poll, reset counters and report the QoS stats
to the end user.
The idea is that the core will periodically poll the frontend for
the stats. The frontend may return -EBUSY, if the previous collect
didn't finish, or it may fill the cached data.
The value returned to the end user is always the cached data.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:09:52 -02:00
Mauro Carvalho Chehab f167e302c6 [media] mb86a20s: don't use state before initializing it
As reported by Feng's kbuild test:
	From: kbuild test robot <fengguang.wu@intel.com>
	Subject: drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'.  (kzalloc returns null)
	Date: Wed, 23 Jan 2013 19:30:43 +0800

	commit: f66d81b54d [media] mb86a20s: convert it to use dev_info/dev_err/dev_dbg

	drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'.  (kzalloc returns null)
	drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: we previously assumed 'state' could be null (see line 705)

As, at mb86a20s_attach(), we have an i2c pointer, use it for all printk
messages there, instead of state->i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 13:22:22 -02:00
Mauro Carvalho Chehab f66d81b54d [media] mb86a20s: convert it to use dev_info/dev_err/dev_dbg
Instead of having its own set of macros, use the Kernel default
ones for debug, error and info.

While here, do some cleanup on the debug printk's.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 09:13:08 -02:00
Mauro Carvalho Chehab dd4493ef34 [media] mb86a20s: Function reorder
Reorder functions to have everything related to stats/status read
close. That will make the file more organized as other stats
routines will be added.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:53:11 -02:00
Mauro Carvalho Chehab d36e418a7b [media] mb86a20s: Split status read logic from DVB callback
Split the logic that reads the status from the DVB callback. That
helps to properly return an error code, if status read fails.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:49:39 -02:00
Mauro Carvalho Chehab 04585921ac [media] mb86a20s: fix interleaving and FEC retrival
Get the proper bits from the TMCC table registers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:17:38 -02:00
Mauro Carvalho Chehab ce77d120ed [media] mb86a20s: make AGC work better
It is recommented to change register 0x0440 value to 0, in order
to fix some AGC bug.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:14:03 -02:00
Mauro Carvalho Chehab fd53744efe [media] mb86a20s: Fix i2c gate on error
If an error happens, restore tuner I2C gate to the right
value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:12:31 -02:00
Mauro Carvalho Chehab a77cfcac79 [media] mb86a20s: improve error handling at get_frontend
The read/write errors are not handled well on get_frontend. Fix it,
by letting the frontend cached values to represent the DVB properties
that were successfully retrieved.
While here, use "c" for dtv_frontend_properties cache, instead of
"p", as this is more common.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:10:52 -02:00
Laurent Pinchart 68d6f84ba0 [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
The uvc_set_ctrl() calls don't write to the hardware. A failure at that
point thus leaves the device in a clean state, with no control modified.
Set the error_idx field to the count value to reflect that, as per the
V4L2 specification.
TRY_EXT_CTRLS is unchanged and the error_idx field must always be set to
the failed control index in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:27 -02:00
Laurent Pinchart 29005c09f4 [media] uvcvideo: Cleanup leftovers of partial revert
Commit ba68c8530a263dc4de440fa10bb20a1c5b9d4ff5 (Partly revert "[media]
uvcvideo: Set error_idx properly for extended controls API failures")
missed two modifications. Clean them up.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:14 -02:00
Laurent Pinchart 9bf42300e6 [media] uvcvideo: Return -EACCES when trying to set a read-only control
Commit ba68c8530a263dc4de440fa10bb20a1c5b9d4ff5 (Partly revert "[media]
uvcvideo: Set error_idx properly for extended controls API failures")
also reverted part of commit 30ecb936cb
("uvcvideo: Return -EACCES when trying to access a read/write-only
control") by mistake. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:01 -02:00
Mauro Carvalho Chehab 734d1ece37 Linux 3.8-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQ7i67AAoJEHm+PkMAQRiGWb4H/jpPGtPKMRNodz3pD6EEvr11
 vUibqULkQk8ZZiFw/y19We2DqfIF8g578B/db55FzE22yQi3whnpxUE2O+x0zSDy
 SeKEDzujVU7TCXflBQ28qDB+P/1u7zLIHhnLltNrx3cqSmzNOmD+482W25UW8YBR
 FgIVDjVWxVc0ZANF0GozajafJvs9DPzxwZo5CRYnxJ/wgnYFMr8QwdILCYW1r75N
 aeojIRcp0s4PHe+SzL1grdTSNdNx/bi5bENmVCzTkOlrXMZbPkYluqJUHjzj8Yt3
 BuE1FPeK1AKudXkOCo4Vgu7W7Yw1jnal33bAXKLkoHuN1dT7HgyZvLZZdl0b3wE=
 =XdP/
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc3' into v4l_for_linus

Linux 3.8-rc3

* tag 'v3.8-rc3': (11110 commits)
  Linux 3.8-rc3
  mm: reinstante dropped pmd_trans_splitting() check
  cred: Remove tgcred pointer from struct cred
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  drm/prime: drop reference on imported dma-buf come from gem
  xen/netfront: improve truesize tracking
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  sctp: fix Kconfig bug in default cookie hmac selection
  EDAC: Cleanup device deregistering path
  EDAC: Fix EDAC Kconfig menu
  EDAC: Fix kernel panic on module unloading
  ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
  ...
2013-01-11 13:28:19 -02:00
Stephen Rothwell 3151d14aa6 [media] media: remove __dev* annotations
Hi Mauro,
After merging the v4l-dvb tree, today's linux-next build (x86_64
allmodconfig) failed like this:
drivers/media/platform/sh_veu.c:1146:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_probe'
drivers/media/platform/sh_veu.c:1228:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_remove'
drivers/media/platform/sh_veu.c:1244:2: error: implicit declaration of function '__devexit_p' [-Werror=implicit-function-declaration]
drivers/media/platform/sh_veu.c:1244:25: error: 'sh_veu_remove' undeclared here (not in a function)
drivers/media/platform/sh_veu.c: In function 'sh_veu_init':
drivers/media/platform/sh_veu.c:1253:45: error: 'sh_veu_probe' undeclared (first use in this function)
drivers/media/platform/sh_veu.c:1253:45: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/sh_veu.c: At top level:
drivers/media/platform/sh_veu.c:1095:20: warning: 'sh_veu_bh' defined but not used [-Wunused-function]
drivers/media/platform/sh_veu.c:1109:20: warning: 'sh_veu_isr' defined but not used [-Wunused-function]
drivers/media/platform/sh_veu.c: In function 'sh_veu_init':
drivers/media/platform/sh_veu.c:1254:1: warning: control reaches end of non-void function [-Wreturn-type]
Caused by commit 05efa71bdc ("[media] media: add a VEU MEM2MEM format
conversion and scaling driver") interacting with commit 54b956b903
("Remove __dev* markings from init.h") from the driver-core.current tree.
I have applied the following merge fix patch which could be applied
directly to the v4l-dvb tree (please):
CONFIG_HOTPLUG is always true now and the __dev* macros have meen removed.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:03:24 -02:00
Linus Torvalds 57a0c1e2d6 Two error path fixes causing a crash and a Kconfig fix for an issue
which spilled all EDAC suboptions into the 'Device Drivers' menu.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ7D0jAAoJEBLB8Bhh3lVKtcgP/3uzBjETQ7KzKG9R+zHxkBom
 7pl6UYqgquqpoqP3tGsn0+oaVyEvY3D11NMp/vhGxUjqJjDnIE3T/TvBMIwaRaq1
 /bPrZ+hE5d2mHWP/TULEVVYMziHhR9UO1SpB+E7vX7FqKcLwzeiS7CMlm4qjq0qC
 duXCG/6gyEKIecT3KPuXFzpojV6pSpSIYvLu03hdS3e8w7Wb6jvomWV282TpaSim
 aFyL909M/f4kexWD0827VnBxogwBWPl1hIGfFVprYGrabgUTtfb/OFhnZut8U1FV
 giDtDgIC7nATp1LzTK+fPE5kx9yZvrE1SV8ZTNF6r0dYH14fnR3YgbQqbVgbLUYF
 icQqCHpyZKD+s/ajymq8lg+ltVtROqCLWdT6YFZlaBlObP0sYltpSj1JRcoC5O6c
 Lx252LQQmxMQZKGnNlBooI6QN73GXlsngTgHD9z3DpFgvRilhA8EmbK2ZFFesdkk
 R4s25yH8fno6ClhxlwyA3+0vwU9B19Ul00cx4/5ZXPdK56Fq7slM/ORTE5SQFrHH
 6QG/pYDz09WXhKvOtX4ZRh2bBudMsY7mgsrxFelGYtsqHikLtYVUzkkyFkccjZMj
 UWcHUHsdSx+gr4DK/jclW1tDgwzh2G17d3FJobujGSgJJIqM2qOo/izON/g4+ojA
 RlKqYTCkAh3fX6DZX1vX
 =Qh4Y
 -----END PGP SIGNATURE-----

Merge tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull EDAC fixes from Borislav Petkov:
 "Two error path fixes causing a crash and a Kconfig fix for an issue
  which spilled all EDAC suboptions into the 'Device Drivers' menu."

* tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC: Cleanup device deregistering path
  EDAC: Fix EDAC Kconfig menu
  EDAC: Fix kernel panic on module unloading
2013-01-09 08:43:56 -08:00
Linus Torvalds 974b33586b ARM: arm-soc fixes for 3.8-rc
People are back from the holiday breaks, and it shows. Here are a bunch of
 fixes for a number of platforms:
  - A couple of small fixes for Nomadik
  - A larger set of changes for kirkwood/mvebu
    - uart driver selection, dt clocks, gpio-poweroff fixups,
      a few __init annotation fixes and some error handling improvement
      in their xor dma driver.
  - i.MX had a couple of minor fixes (and a critical one for flexcan2
    clock setup)
  - MXS has a small board fix and a framebuffer bugfix
  - A set of fixes for Samsung Exynos, fixing default bootargs and some
    Exynos5440 clock issues
  - A set of OMAP changes including PM fixes and a few sparse warning
    fixups
 
 All in all a bit more positive code delta than we'd ideally want to see
 here, mostly from the OMAP PM changes, but nothing overly crazy.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ7GYhAAoJEIwa5zzehBx31HMP/jqBBdEAKBoQrVPXgCISTkGp
 WzpPbFnt17R9uxVZFjsmlcTgBOURSkbDwENVnyJ4ZkVFOAQHOSCriyQFrsgeBAEj
 WU2FK3E6/V4BHob8hSqmbCjwRUyzOM6z4+oMZQgpBS2y0sgVWFySOE3Fe7cf1IJr
 11D5/mzOqRYu8fkXar2ksK752N7O5m9sZoJ4A8cJs1DBL8/a0c6ASZGkaKql0WFn
 hel6nFznTe/qZwGqjIOaWrFhUe9pmqRlRtTDT5hlmMzC4+O12TEBaFIrJHlq8SkZ
 nxSdZcD9ERAgp58zMEMzDI0ZNkdXTV3xRtkehTvaJheCpeAGq0J63fEd/Yn4T/V3
 fUeNrUqNLl59dZEvFS1Xm/2dpYLrUDCkNWQoTAjLAfEmJ1v9vjcP22seXD9tzXtl
 XdcjEIOnAb+d3J6D3vW1EvgPiTrS0EId5Mkv/LSIAyR0OAjqJr3L/keUUG2OVH1q
 UW7V052KEW0P0jDQnmhxNkkl8fnZCQtLRH9ukVs2qIbH28QBaH3irdFv+S74P2l2
 MWBqh21dm//PBJQqg1ujf0nl7IuCqDVaUYt6VYholGaRoyMaCSVsazJwC0/kzTNz
 EYVI8kAUIWQnAxXL5uN3oiqoSASKOfwtHGOJB7CB2FgdEVNWhdUpLk0xDi5ssF8o
 Iatq6W91y3xCkLhIP+77
 =s9fE
 -----END PGP SIGNATURE-----

Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "People are back from the holiday breaks, and it shows.  Here are a
  bunch of fixes for a number of platforms:
   - A couple of small fixes for Nomadik
   - A larger set of changes for kirkwood/mvebu
     - uart driver selection, dt clocks, gpio-poweroff fixups, a few
       __init annotation fixes and some error handling improvement in
       their xor dma driver.
   - i.MX had a couple of minor fixes (and a critical one for flexcan2
     clock setup)
   - MXS has a small board fix and a framebuffer bugfix
   - A set of fixes for Samsung Exynos, fixing default bootargs and some
     Exynos5440 clock issues
   - A set of OMAP changes including PM fixes and a few sparse warning
     fixups

  All in all a bit more positive code delta than we'd ideally want to
  see here, mostly from the OMAP PM changes, but nothing overly crazy."

* tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits)
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  pinctrl: mvebu: make pdma clock on dove mandatory
  ARM: Dove: Add pinctrl clock to DT
  dma: mv_xor: fix error handling for clocks
  dma: mv_xor: fix error handling of mv_xor_channel_add()
  arm: mvebu: Add missing ; for cpu node.
  arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
  arm: mvebu: Armada XP MV78230 has two cores, not one
  clk: mvebu: Remove inappropriate __init tagging
  ARM: Kirkwood: Use fixed-regulator instead of board gpio call
  ARM: Kirkwood: Fix missing sdio clock
  ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
  ...
2013-01-08 18:53:56 -08:00
Linus Torvalds ca5c8a4c2a Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm update from Dave Airlie:
 "Exynos and Radeon mostly, with a dma-buf and ttm fix thrown in.

  It's a bit big but its mostly exynos license fix ups and I'd rather
  not hold those up since its legally stuff.

  Radeon has a couple of fixes from dma engine work, TTM is just a
  locking fix, and dma-buf fix has been hanging around and I finally got
  a chance to review it."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (30 commits)
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  drm/prime: drop reference on imported dma-buf come from gem
  drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
  drm/exynos: move finish page flip to a common place
  drm/exynos: fimd: modify condition in fimd resume
  drm/radeon: fix DMA CS parser for r6xx linear copy packet
  drm/radeon: split r6xx and r7xx copy_dma functions
  drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
  drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
  drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
  drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
  drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
  drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
  drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
  drm/exynos: Remove redundant NULL check
  drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
  drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
  drm/exynos: fix gem buffer allocation type checking
  drm/exynos: remove needless parenthesis.
  drm/exynos: fix incorrect interrupt induced by m2m operation.
  ...
2013-01-08 16:08:10 -08:00
Olof Johansson 5595e755b6 I have to send one critical mxsfb fix through arm-soc, as FB maintainer
is unresponsive for quite a while.  People start complaining the missing
 of such an important fix.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJQ7DwYAAoJEFBXWFqHsHzOHnUH/2V7EKzq8g6FH5DyOf3+9x9f
 I+KyjVusIFdbLIJZhswbTnd2f1k5FQnQ+djd6fERi/wZ8IcG70vPRscKIYrLX6po
 gd0z684ORsBwNrHMfcKSY6DwZF2cLtP5BpyvtQzKHpP3nTYBgE7ePSFlfsAdJ5OG
 C77/tj61B/bUe0Mm8ygjMCwYsdqaR2+MTdEcStvOmwd4x+PBT3uSd56TFhXW2kt5
 Py2d48wowncNM5CVIW7vvH4kaaCW4h6mxnc3gyc8YS8h1JFItdYFSNUzT9Mb5ene
 aM3He/pp82OoXm84Swhi5Ah5566WVor+bgnvJ1TmV4Q/yd6Cn+MA2nIOevTnJvo=
 =Tjtj
 -----END PGP SIGNATURE-----

Merge tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo:
I have to send one critical mxsfb fix through arm-soc, as FB maintainer
is unresponsive for quite a while.  People start complaining the missing
of such an important fix.

* tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6:
  video: mxsfb: fix crash when unblanking the display
  ARM: dts: imx23-olinuxino: Fix IOMUX settings
2013-01-08 08:39:27 -08:00
Linus Torvalds 5c33d9b248 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) New sysctl ndisc_notify needs some documentation, from Hanns
    Frederic Sowa.

 2) Netfilter REJECT target doesn't set transport header of SKB
    correctly, from Mukund Jampala.

 3) Forcedeth driver needs to check for DMA mapping failures, from Larry
    Finger.

 4) brcmsmac driver can't use usleep_range while holding locks, use
    udelay instead.  From Niels Ole Salscheider.

 5) Fix unregister of netlink bridge multicast database handlers, from
    Vlad Yasevich and Rami Rosen.

 6) Fix checksum calculations in netfilter's ipv6 network prefix
    translation module.

 7) Fix high order page allocation failures in netfilter xt_recent, from
    Eric Dumazet.

 8) mac802154 needs to use netif_rx_ni() instead of netif_rx() because
    mac802154_process_data() can execute in process rather than
    interrupt context.  From Alexander Aring.

 9) Fix splice handling of MSG_SENDPAGE_NOTLAST, otherwise we elide one
    tcp_push() too many.  From Eric Dumazet and Willy Tarreau.

10) Fix skb->truesize tracking in XEN netfront driver, from Ian
    Campbell.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
  xen/netfront: improve truesize tracking
  ipv4: fix NULL checking in devinet_ioctl()
  tcp: fix MSG_SENDPAGE_NOTLAST logic
  net/ipv4/ipconfig: really display the BOOTP/DHCP server's address.
  ip-sysctl: fix spelling errors
  mac802154: fix NOHZ local_softirq_pending 08 warning
  ipv6: document ndisc_notify in networking/ip-sysctl.txt
  ath9k: Fix Kconfig for ATH9K_HTC
  netfilter: xt_recent: avoid high order page allocations
  netfilter: fix missing dependencies for the NOTRACK target
  netfilter: ip6t_NPT: fix IPv6 NTP checksum calculation
  bridge: add empty br_mdb_init() and br_mdb_uninit() definitions.
  vxlan: allow live mac address change
  bridge: Correctly unregister MDB rtnetlink handlers
  brcmfmac: fix parsing rsn ie for ap mode.
  brcmsmac: add copyright information for Canonical
  rtlwifi: rtl8723ae: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192se: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192de: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192ce: Fix warning for unchecked pci_map_single() call
  ...
2013-01-08 07:31:49 -08:00
Daniel Vetter e8e89622ed drm/ttm: fix fence locking in ttm_buffer_object_transfer
Noticed while reviewing the fence locking in the radeon pageflip
handler.

v2: Instead of grabbing the bdev->fence_lock in object_transfer just
move the single callsite of that function a few lines, so that it is
protected by the fence_lock. Suggested by Jerome Glisse.

v3: Fix typo in commit message.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-08 18:35:31 +10:00
Dave Airlie c75be2592c Merge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux into drm-next
Alex writes:
 A few more fixes for DMA and a mac quirk.

* 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
  drm/radeon: fix DMA CS parser for r6xx linear copy packet
  drm/radeon: split r6xx and r7xx copy_dma functions
2013-01-08 14:52:52 +10:00
Seung-Woo Kim be8a42ae60 drm/prime: drop reference on imported dma-buf come from gem
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem
makes memory leak. release function of dma-buf cannot be called because f_count
of dma-buf increased by importing gem and gem ref count cannot be decrease
because of exported dma-buf.

So I add dma_buf_put() for imported gem come from its own gem into each drivers
having prime_import and prime_export capabilities. With this, only gem ref
count is increased if importing gem exported from gem of same driver.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-08 14:41:53 +10:00
Ian Campbell d9a58a782e xen/netfront: improve truesize tracking
Using RX_COPY_THRESHOLD is incorrect if the SKB is actually smaller
than that. We have already accounted for this in
NETFRONT_SKB_CB(skb)->pull_to so use that instead.

Fixes WARN_ON from skb_try_coalesce.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: annie li <annie.li@oracle.com>
Cc: xen-devel@lists.xen.org
Cc: netdev@vger.kernel.org
Cc: stable@kernel.org # 3.7.x only
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-07 19:51:19 -08:00
Linus Torvalds 2a893f91f5 ACPI and power management fixes for 3.8-rc3
* Removal of some ACPICA code that the kernel will never use from Lv Zheng.
 
 * APEI fix from Adrian Huang.
 
 * Removal of unnecessary ACPI memory hotplug driver code from Liu Jinsong.
 
 * Minor ACPI power management fixes.
 
 * ACPI debug code fix from Joe Perches.
 
 * ACPI fix to make system bus device nodes get the right names.
 
 * PNP resources handling fixes from Witold Szczeponik.
 
 * cpuidle fix for a recent regression stalling boot on systems with great
   numbers of CPUs from Daniel Lezcano.
 
 * cpuidle fixes from Sivaram Nair.
 
 * intel_idle debug message fix from Youquan Song.
 
 * cpufreq build regression fix from Larry Finger.
 
 * cpufreq fix for an obscure initialization race related to statistics from
   Konstantin Khlebnikov.
 
 * cpufreq change disabling the Longhaul driver by default from Rafał Bilski.
 
 * PM core fix preventing device suspend errors from happening during system
   suspend due to obscure race conditions.
 
 * PM QoS local variable name cleanup.
 
 --
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ61zgAAoJEKhOf7ml8uNsaYsQAK6EXORIIIvHtudjkcxcOxPp
 pQaHQ1/YHjxoO3N/dZpjgbozwSnkrf5iJs6BaN+LpbqLS3eRJDEJm3Hx8YAkt+bx
 ZcMUlPqr90W5AXvjlbJjyHIrupOX7TChgyyC0a8uTvDSylJMimWtEGn/VeYVRaCs
 GLfyVmDwMlMmC85vK+x27IoUxNuGzPiGx2s//thHv4HRL7d+5xn2Da0AHPSeZTZe
 ZuNCyWKwVzpJ8mjclAOTtwMUHGYys0x+T+7wa5IZq4yH0gEQZoKfLGW3uOg+h4R5
 wp8XhipORQh5A1AMGpC3bDhsplGggL1ImN2k50h4lKIAtpY8t1m++63i7hHiHX1I
 mfvNyinMJsnud80AZN5MgMAqykYDvgwO562LmaSBc+zNq2B1cfHuex9iA7CC+WAY
 5IKxN3EGPyQomkBRSYGnAEKw5jvktPMRT6JuLjLiwaz7NcWN72lWv66Xq34RLEld
 zZavCmo+fS7PWk5ofNh4RDrH+Zi02XixsgycmeKFxG+U1i/aM6tO3t9fcetUzIlJ
 JqCHAjyA8AyCApbm4GgVQBkw1MP8SsXeJ3FnYynx8n23EmHvh7gIUiG/Hk1vOEpF
 0ExwJMOOTXcv5BcfoCoF0VBJNBGq1wzipwN43Nj55LLUfJ4Ovp/T+ySXOc6seb3C
 nqx2e4VzVs0Gu2Cdt+wy
 =k35e
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

 - Removal of some ACPICA code that the kernel will never use from Lv
   Zheng.

 - APEI fix from Adrian Huang.

 - Removal of unnecessary ACPI memory hotplug driver code from Liu
   Jinsong.

 - Minor ACPI power management fixes.

 - ACPI debug code fix from Joe Perches.

 - ACPI fix to make system bus device nodes get the right names.

 - PNP resources handling fixes from Witold Szczeponik.

 - cpuidle fix for a recent regression stalling boot on systems with
   great numbers of CPUs from Daniel Lezcano.

 - cpuidle fixes from Sivaram Nair.

 - intel_idle debug message fix from Youquan Song.

 - cpufreq build regression fix from Larry Finger.

 - cpufreq fix for an obscure initialization race related to statistics
   from Konstantin Khlebnikov.

 - cpufreq change disabling the Longhaul driver by default from Rafał
   Bilski.

 - PM core fix preventing device suspend errors from happening during
   system suspend due to obscure race conditions.

 - PM QoS local variable name cleanup.

* tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM: Move disabling/enabling runtime PM to late suspend/early resume
  PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
  ACPI / scan: Do not use dummy HID for system bus ACPI nodes
  cpufreq / governor: Fix problem with cpufreq_ondemand or cpufreq_conservative
  cpufreq / Longhaul: Disable driver by default
  cpufreq / stats: fix race between stats allocation and first usage
  cpuidle: fix lock contention in the idle path
  intel_idle: pr_debug information need separated
  cpuidle / coupled: fix ready counter decrement
  cpuidle: Fix finding state with min power_usage
  PNP: Handle IORESOURCE_BITS in resource allocation
  PNP: Simplify setting of resources
  ACPI / power: Remove useless message from device registering routine
  ACPI / glue: Update DBG macro to include KERN_DEBUG
  ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
  ACPI / memhotplug: remove redundant logic of acpi memory hotadd
  ACPI / APEI: Fix the returned value in erst_dbg_read
  ACPICA: Remove useless mini-C library.
2013-01-07 16:17:18 -08:00
Lans Zhang 44d22e2404 EDAC: Cleanup device deregistering path
Use device_unregister to replace put_device + device_del for
cleanup, and fix the potential use after free.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:43:00 +01:00
Borislav Petkov 5445166384 EDAC: Fix EDAC Kconfig menu
After f65aad41772f("MIPS: Cavium: Add EDAC support."), when entering
the "Device Drivers" toplevel menu in menuconfig, the suboptions behind
EDAC appeared merged with the rest of the device drivers types. This was
because the menuconfig option EDAC is querying an EDAC_SUPPORT Kconfig
bool which was defined after the menu definition.

When pushing EDAC_SUPPORT up, before the menu definition, the variable
is defined earlier and the above menuconfig artifact doesn't happen.

Drop a useless menuconfig comment while at it.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:42:59 +01:00