Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6072ace4 authored by Dave Jones's avatar Dave Jones
Browse files

[CPUFREQ] checkpatch cleanups for sc520



Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 14a6650f
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -19,17 +19,19 @@

#include <linux/delay.h>
#include <linux/cpufreq.h>
#include <linux/timex.h>
#include <linux/io.h>

#include <asm/msr.h>
#include <asm/timex.h>
#include <asm/io.h>

#define MMCR_BASE	0xfffef000	/* The default base address */
#define OFFS_CPUCTL	0x2   /* CPU Control Register */

static __u8 __iomem *cpuctl;

#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "sc520_freq", msg)
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
		"sc520_freq", msg)
#define PFX "sc520_freq: "

static struct cpufreq_frequency_table sc520_freq_table[] = {
	{0x01,	100000},
@@ -43,7 +45,8 @@ static unsigned int sc520_freq_get_cpu_frequency(unsigned int cpu)

	switch (clockspeed_reg & 0x03) {
	default:
		printk(KERN_ERR "sc520_freq: error: cpuctl register has unexpected value %02x\n", clockspeed_reg);
		printk(KERN_ERR PFX "error: cpuctl register has unexpected "
				"value %02x\n", clockspeed_reg);
	case 0x01:
		return 100000;
	case 0x02:
@@ -87,7 +90,8 @@ static int sc520_freq_target (struct cpufreq_policy *policy,
{
	unsigned int newstate = 0;

	if (cpufreq_frequency_table_target(policy, sc520_freq_table, target_freq, relation, &newstate))
	if (cpufreq_frequency_table_target(policy, sc520_freq_table,
				target_freq, relation, &newstate))
		return -EINVAL;

	sc520_freq_set_cpu_state(newstate);
@@ -116,7 +120,7 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy)

	result = cpufreq_frequency_table_cpuinfo(policy, sc520_freq_table);
	if (result)
		return (result);
		return result;

	cpufreq_frequency_table_get_attr(sc520_freq_table, policy->cpu);