[media] drivers/media/pci/mantis/mantis_cards: Convert to module_pci_driver

use module_pci_driver instead of init/exit, make code clean

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] pvrusb2: Cocci spatch "memdup.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] staging/media: lirc_imon: fix leaks in imon_probe()

Error handling of usb_submit_urb() is not as all others in imon_probe().
It just unlocks mutexes and returns nonzero leaving all already
allocated resources unfreed.
The patch makes sure all the resources are deallocated.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
mfd: wm8994: Reset device during probe

Ensure that the device is in a known good state. This should have little
practical impact as the runtime PM will reset the device shortly after
probe but it's neater.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thermal: CPU Package temperature thermal

This driver register CPU digital temperature sensor as a thermal
zone at package level.
Each package will show up as one zone with at max two trip points.
These trip points can be both read and updated. Once a non zero
value is set in the trip point, if the package package temperature
goes above or below this setting, a thermal notification is
generated.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Thermal: Documentation for x86 package temperature thermal driver

Added documentation describing details of the x86 package temperature
thermal driver.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Merge branch 'cpu-package-thermal' of .git into next

Conflicts:
	drivers/thermal/Kconfig
	drivers/thermal/Makefile
MIPS: DEC: remove unbuildable promcon.c

promcon.o is built if CONFIG_PROM_CONSOLE is set. But there's no Kconfig
symbol PROM_CONSOLE, so promcon.c is unbuildable. Remove it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5344/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: MSP71xx: Remove gpio drivers

The PMC MSP71XX gpio drivers were added in v2.6.28, see commit
9fa32c6b02 ("MIPS: PMC MSP71XX gpio drivers"). They are only built if
CONFIG_HAVE_GPIO_LIB is set.

But the Kconfig symbol HAVE_GPIO_LIB was already removed in v2.6.27, see
commit 7444a72eff ("gpiolib: allow user-selection"). So these drivers
were never buildable. Perhaps no-one noticed because there are no in
tree users of msp71xx_init_gpio() and msp71xx_init_gpio_extended().
Anyhow, these drivers can safely be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5345/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
mips: lasat: sysctl: Convert use of typedef ctl_table to struct ctl_table

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5460/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
irqdomain: Remove temporary MIPS workaround code

The MIPS interrupt controllers are all registering their own irq_domains
now. Drop the MIPS specific code because it is no longer needed.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5458/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
mfd: arizona: Integrate wm8997 into Arizona mfd

The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus
interfacing, for smartphones, tablets and other portable audio devices
based on the Arizona platform.

This patch integrates the wm8997 into the Arizona mfd.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: 88pm800: Fix NULL pointer dereference

Move "device_800_init" to fix NULL pointer error when
calling "device_gpadc_init" as it needs "subchip->regmap_gpadc"
to set registers via regmap interface

Signed-off-by: Yi Zhang <yizhang@marvell.com>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: 88pm80x: Fix driver name for 88pm800 and 88pm805

88pm800 and 88pm805 shouldnot have the same driver name.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: 88pm800: Initialize mask_invert

mask_invert must be set otherwise interrupts cannot be cleared.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: 88pm800: 88pm805: Remove "IRQF_TRIGGER_FALLING" flag

88pm800/88pm805 interrupt is asserted low if the events happened.
So remove IRQF_TRIGGER_FALLING for irq request.
Also, the interrupt wiring is board dependent so do not set
IRQF_TRIGGER by default.

Signed-off-by: Yi Zhang <yizhang@marvell.com>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: 88pm800: Remove the power and gpadc page addr from platform data

88pm800 has two addtional pages - power and gpadc.
The address of the pages depends on the address of 88pm800.
So do not need pass the address of the power and gpadc in
platform data.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
thermal: fix x86_pkg_temp_thermal.c build and Kconfig

Fix build error in x86_pkg_temp_thermal.c.  It requires that
X86_MCE & X86_THERMAL_VECTOR be enabled, so depend on the latter symbol,
since it depends on X86_MCE (indirectly).

Also, X86_PKG_TEMP_THERMAL is already inside an "if THERMAL" block,
so remove that duplicated dependency.

ERROR: "platform_thermal_package_rate_control" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
ERROR: "platform_thermal_package_notify" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Merge branch 'cpu-package-thermal' of .git into next
mfd: 88pm800: Enhance error handling for sub pages probe/remove

pm800_pages_init and pm800_pages_exit are called by pm800_probe.
Change the code to enhance error handling and remove unused code at
pm800_pages_init/exit and pm800_probe.

Signed-off-by: Yi Zhang <yizhang@marvell.com>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>