mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Beregalov <a.beregalov@gmail.com>
To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca, davej@redhat.com,
	Alexander Beregalov <a.beregalov@gmail.com>
Subject: [PATCH] cpufreq: fix UP build
Date: Wed,  8 Jul 2009 21:57:47 +0400	[thread overview]
Message-ID: <1247075867-11355-1-git-send-email-a.beregalov@gmail.com> (raw)

From: Alexander Beregalov <a.beregalov@gmail.com> 

Fix this build error when CONFIG_SMP is not set:
drivers/cpufreq/cpufreq.c:941: 'managed_policy' undeclared

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---

Tested on AthlonXP/NForce2


 drivers/cpufreq/cpufreq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index c668ac8..287872f 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -773,11 +773,11 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
 	struct cpufreq_policy new_policy;
 	struct cpufreq_policy *policy;
 	struct freq_attr **drv_attr;
-	struct sys_device *cpu_sys_dev;
 	unsigned long flags;
 	unsigned int j;
 #ifdef CONFIG_SMP
 	struct cpufreq_policy *managed_policy;
+	struct sys_device *cpu_sys_dev;
 #endif
 
 	if (cpu_is_offline(cpu))
@@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
 	}
 	spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
+#ifdef CONFIG_SMP
 	/* symlink affected CPUs */
 	for_each_cpu(j, policy->cpus) {
 		if (j == cpu)
@@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
 			goto err_out_unregister;
 		}
 	}
+#endif
 
 	policy->governor = NULL; /* to assure that the starting sequence is
 				  * run in cpufreq_set_policy */
-- 
1.6.3.3


             reply	other threads:[~2009-07-08 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08 17:57 Alexander Beregalov [this message]
2009-07-08 18:08 ` Linus Torvalds
2009-07-08 18:17   ` Dave Jones
2009-07-08 20:17   ` Dave Jones
2009-07-08 18:15 ` Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247075867-11355-1-git-send-email-a.beregalov@gmail.com \
    --to=a.beregalov@gmail.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®