Skip to content

Commit

Permalink
OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
Browse files Browse the repository at this point in the history
if we enable CPUFREQ we can't build omap2 for two reasons,
one of them is fixed by the patch below.

It's failing because the __must_be_array() check in
ARRAY_SIZE() is failing and printing the following message:

arch/arm/mach-omap2/clock2xxx.c:453: error: negative width in bit-field '<anonymous>'

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
[paul@pwsan.com: commit message updated; changed rate variable name]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Felipe Balbi authored and Paul Walmsley committed Jan 8, 2010
1 parent 9b11769 commit 19fe458
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/mach-omap2/clock2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,15 @@ static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)];
void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
{
struct prcm_config *prcm;
long sys_ck_rate;
int i = 0;

sys_ck_rate = clk_get_rate(sclk);

for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask))
continue;
if (prcm->xtal_speed != sys_ck.rate)
if (prcm->xtal_speed != sys_ck_rate)
continue;

/* don't put bypass rates in table */
Expand Down

0 comments on commit 19fe458

Please sign in to comment.