drm/exynos: remove dead code in vidi_power_on

The type of input parameter enable is bool, so it does not need
to check whether true or false.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: initialize the buf_num in vp_video_buffer

The buf_num in vp_video_buffer() should be 1 or 2, but it is not
initialized, and only set to 2 in NV12M or NV12MT cases.
So this patch initializes the buf_num with 1 as default.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: add error check routine in exynos_drm_open

When the exynos_drm_subdrv_open() returns error, the file_priv
should be released and file->driver_priv set to NULL.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: use drm_calloc_large when allocates pointer array

If the type of object is pointer array, the drm_calloc_large() is
more suitable than kzalloc() for its allocation function. And uses
drm_free_large() instead of kfree() also.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: fix pages allocation size in lowlevel_buffer_allocate

When IOMMU is not supported, buf->pages has to be allocated to
assign the result of phys_to_page() which return type is struct
page *. So it is sufficient to allocate buf->pages with the size
of multiple struct page pointers.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: remove duplicated error routine and unnecessary assign

There were duplicated error handling routines during allocating
pages in lowlevel_buffer_allocate() and g2d_userptr_get_dma_addr().
Also unnecessary NULL assignments for variable used not any more
are removed from g2d_userptr_get_dma_addr() and
g2d_userptr_put_dma_addr().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
metag: move EXPORT_SYMBOL(csum_partial) to metag_ksyms.c

Move EXPORT_SYMBOL(csum_partial) from lib/checksum.c into metag_ksyms.c
so that it doesn't get omitted by the static linker if it's not used by
any other statically linked code, which can result in undefined symbols
when building modules.

For example a randconfig caused the following error:
ERROR: "csum_partial" [fs/reiserfs/reiserfs.ko] undefined!

Signed-off-by: James Hogan <james.hogan@imgtec.com>
drm/i915: reinit status page registers after gpu reset

This fixes gpu reset on my gm45 - without this patch the bsd thing is
forever stuck since the seqno updates never reach the status page.

Tbh I have no idea how this ever worked without rewriting the hws
registers after a gpu reset.

To satisfy my OCD also give the functions a bit more consistent names:
- Use status_page everywhere, also for the physical addressed one.
- Use init for the allocation part and setup for the register setup
  part consistently.

Long term I'd really like to share the hw init parts completely
between gpu reset, resume and driver load, i.e. to call
i915_gem_init_hw instead of the individual pieces we might need.

v2: Add the missing paragraph to the commit message about what bug
exactly this patch here fixes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: lu hua <huax.lu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
regulator: s5m8767: Fix a trivial typo in documentation

Changed volatage to voltage.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
regulator: max8997: Fix a trivial typo in documentation

Changed volatage to voltage.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
MAINTAINERS: Update git repository

The current git repository hasn't been updated since quite a long time.
Update it with Mark's git repo which is the currently maintained one.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Merge remote-tracking branch 'regulator/fix/max8997' into regulator-linus
Merge remote-tracking branch 'regulator/fix/s5m8767' into regulator-linus
Merge remote-tracking branch 'regulator/fix/sec' into regulator-linus
ALSA: hda - Fix EAPD vmaster hook for AD1884 & co

ad1884_fixup_hp_eapd() tries to set the NID for controlling the
speaker EAPD from the pin configuration.  But the current code can't
work expectedly since it sets spec->eapd_nid before calling the
generic parser where the autocfg pins are set up.

This patch changes the function to set spec->eapd_nid after the
generic parser call while it sets vmaster hook unconditionally.  The
spec->eapd_nid check is moved in the hook function itself instead.

Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
cpufreq: Fix serialization of frequency transitions

Commit 7c30ed ("cpufreq: make sure frequency transitions are serialized")
interacts poorly with systems that have a single core freqency for all
cores.  On such systems we have a single policy for all cores with
several CPUs.  When we do a frequency transition the governor calls the
pre and post change notifiers which causes cpufreq_notify_transition()
per CPU.  Since the policy is the same for all of them all CPUs after
the first and the warnings added are generated by checking a per-policy
flag the warnings will be triggered for all cores after the first.

Fix this by allowing notifier to be called for n times. Where n is the number of
cpus in policy->cpus.

Reported-and-tested-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI / PM: Fix corner case in acpi_bus_update_power()

The role of acpi_bus_update_power() is to update the given ACPI
device object's power.state field to reflect the current physical
state of the device (as inferred from the configuration of power
resources and _PSC, if available).  For this purpose it calls
acpi_device_set_power() that should update the power resources'
reference counters and set power.state as appropriate.  However,
that doesn't work if the "new" state is D1, D2 or D3hot and the
the current value of power.state means D3cold, because in that
case acpi_device_set_power() will refuse to transition the device
from D3cold to non-D0.

To address this problem, make acpi_bus_update_power() call
acpi_power_transition() directly to update the power resources'
reference counters and only use acpi_device_set_power() to put
the device into D0 if the current physical state of it cannot
be determined.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
ARM: OMAP2+: timer: initialize before using oh_name

of_property_read_string_index(...,&oh_name) in omap_dm_timer_init_one
does not alter the value of 'oh_name' even if the relevant function
fails and as 'oh_name' in stack may have a non-zero value, it would
be misunderstood by timer code that DT has specified "ti,hwmod"
property for timer. 'oh_name' in this scenario would be a junk value,
this would result in module not being enabled by hwmod API's for
timer, and in turn crash.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Jon Hunter <jgchunter@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
ACPI / dock: Actually define acpi_dock_init() as void

Commit 94add0f (ACPI / dock: Initialize ACPI dock subsystem upfront)
changed the header of acpi_dock_init() in internal.h so that it is
supposed to be a void function now, but it forgot to update its
actual definition in dock.c according to which it still is supposed
to return int.

Although that didn't cause any visible breakage or even a compiler
warning to be thrown, which is odd enough, fix it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.10+ <stable@vger.kernel.org>
ACPI / scan: remove unused LIST_HEAD(acpi_device_list)

The acpi_device_list list is not used, so removed it.

[rjw: Changelog]
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>