From: Mark Brown <broonie(a)linaro.org>
Since NULL could in theory be a valid regulator we ought to check for
IS_ERR() rather than for NULL. In practice this is unlikely to be an
issue but it's better for neatness.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/cpufreq/cpufreq-cpu0.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index ad1fde2..09cd3a7 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -69,7 +69,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
- if (cpu_reg) {
+ if (!IS_ERR(cpu_reg)) {
rcu_read_lock();
opp = opp_find_freq_ceil(cpu_dev, &freq_Hz);
if (IS_ERR(opp)) {
@@ -90,7 +90,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
freqs.new / 1000, volt ? volt / 1000 : -1);
/* scaling up? scale voltage before frequency */
- if (cpu_reg && freqs.new > freqs.old) {
+ if (!IS_ERR(cpu_reg) && freqs.new > freqs.old) {
ret = regulator_set_voltage_tol(cpu_reg, volt, tol);
if (ret) {
pr_err("failed to scale voltage up: %d\n", ret);
@@ -102,14 +102,14 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
ret = clk_set_rate(cpu_clk, freq_exact);
if (ret) {
pr_err("failed to set clock rate: %d\n", ret);
- if (cpu_reg)
+ if (!IS_ERR(cpu_reg))
regulator_set_voltage_tol(cpu_reg, volt_old, tol);
freqs.new = freqs.old;
goto post_notify;
}
/* scaling down? scale voltage after frequency */
- if (cpu_reg && freqs.new < freqs.old) {
+ if (!IS_ERR(cpu_reg) && freqs.new < freqs.old) {
ret = regulator_set_voltage_tol(cpu_reg, volt, tol);
if (ret) {
pr_err("failed to scale voltage down: %d\n", ret);
@@ -210,7 +210,6 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
}
pr_warn("failed to get cpu0 regulator: %ld\n",
PTR_ERR(cpu_reg));
- cpu_reg = NULL;
}
cpu_clk = devm_clk_get(cpu_dev, NULL);
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
Since the cpufreq-cpu0 driver is capable of coping without a software
controllable regulator and would be confused by a dummy one it should
use devm_regulator_get_optional() to ensure no dummy is provided.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
devm_regulator_get_optional() is a new API in my tree for -next, is it
OK to merge this patch via that branch?
drivers/cpufreq/cpufreq-cpu0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 09cd3a7..b946ac7 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -197,7 +197,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
cpu_dev = &pdev->dev;
cpu_dev->of_node = np;
- cpu_reg = devm_regulator_get(cpu_dev, "cpu0");
+ cpu_reg = devm_regulator_get_optional(cpu_dev, "cpu0");
if (IS_ERR(cpu_reg)) {
/*
* If cpu0 regulator supply node is present, but regulator is
--
1.8.4.rc1
__init belongs after the return type on functions, not before it.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 8265607..c90112c 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -1055,7 +1055,7 @@ err_unregister:
*
* This is called by acpi_walk_namespace to look for dock stations and bays.
*/
-static __init acpi_status
+static acpi_status __init
find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
{
if (is_dock(handle) || is_ejectable_bay(handle))
--
1.7.9.5
From: Mark Brown <broonie(a)linaro.org>
Ensure that the recently added path kcontrol list is initialised otherwise
we may crash trying to delete routes that don't have kcontrols.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/soc-dapm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b78eaa1..1e0e4ce 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2357,6 +2357,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
path->sink = wsink;
path->connected = connected;
INIT_LIST_HEAD(&path->list);
+ INIT_LIST_HEAD(&path->list_kcontrol);
INIT_LIST_HEAD(&path->list_source);
INIT_LIST_HEAD(&path->list_sink);
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
Attempting to create the route as part of adding a mux control causes us
to attempt to add the same route twice since we loop over all sources
for the mux after creating the control. Instead do the addition in the
callers.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/soc-dapm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 662a904..b78eaa1 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -665,7 +665,7 @@ static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
* create it. Either way, add the widget into the control's widget list
*/
static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w,
- int kci, struct snd_soc_dapm_path *path)
+ int kci)
{
struct snd_soc_dapm_context *dapm = w->dapm;
struct snd_card *card = dapm->card->snd_card;
@@ -766,7 +766,6 @@ static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w,
return ret;
w->kcontrols[kci] = kcontrol;
- dapm_kcontrol_add_path(kcontrol, path);
return 0;
}
@@ -790,9 +789,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w)
continue;
}
- ret = dapm_create_or_share_mixmux_kcontrol(w, i, path);
+ ret = dapm_create_or_share_mixmux_kcontrol(w, i);
if (ret < 0)
return ret;
+
+ dapm_kcontrol_add_path(w->kcontrols[i], path);
}
}
@@ -821,7 +822,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
path = list_first_entry(&w->sources, struct snd_soc_dapm_path,
list_sink);
- ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path);
+ ret = dapm_create_or_share_mixmux_kcontrol(w, 0);
if (ret < 0)
return ret;
--
1.8.4.rc1
These patches are for separating the SOC On-Chip ohci host controller
from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM.
Manjunath Goudar (2):
USB: OHCI: make ohci-ep93xx a separate driver
USB: OHCI: make ohci-pxa27x a separate driver
drivers/usb/host/Kconfig | 16 +++++
drivers/usb/host/Makefile | 2 +
drivers/usb/host/ohci-ep93xx.c | 84 ++++++++++------------
drivers/usb/host/ohci-hcd.c | 24 -------
drivers/usb/host/ohci-pxa27x.c | 154 ++++++++++++++++------------------------
5 files changed, 120 insertions(+), 160 deletions(-)
--
1.7.9.5