mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	The following build warning is seen with W=1: warning: no previous prototype for ‘imx5_cpuidle_init’ [-Wmissing-prototypes] int __init imx5_cpuidle_init(void) Fix this warning by including "cpuidle.h". Signed-off-by: Marco Franchi <marco.franchi@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (C) 2012 Freescale Semiconductor, Inc.
 | 
						|
 *
 | 
						|
 * This program is free software; you can redistribute it and/or modify
 | 
						|
 * it under the terms of the GNU General Public License version 2 as
 | 
						|
 * published by the Free Software Foundation.
 | 
						|
 */
 | 
						|
 | 
						|
#include <linux/cpuidle.h>
 | 
						|
#include <linux/module.h>
 | 
						|
#include <asm/system_misc.h>
 | 
						|
#include "cpuidle.h"
 | 
						|
 | 
						|
static int imx5_cpuidle_enter(struct cpuidle_device *dev,
 | 
						|
			      struct cpuidle_driver *drv, int index)
 | 
						|
{
 | 
						|
	arm_pm_idle();
 | 
						|
	return index;
 | 
						|
}
 | 
						|
 | 
						|
static struct cpuidle_driver imx5_cpuidle_driver = {
 | 
						|
	.name             = "imx5_cpuidle",
 | 
						|
	.owner            = THIS_MODULE,
 | 
						|
	.states[0] = {
 | 
						|
		.enter            = imx5_cpuidle_enter,
 | 
						|
		.exit_latency     = 2,
 | 
						|
		.target_residency = 1,
 | 
						|
		.name             = "IMX5 SRPG",
 | 
						|
		.desc             = "CPU state retained,powered off",
 | 
						|
	},
 | 
						|
	.state_count = 1,
 | 
						|
};
 | 
						|
 | 
						|
int __init imx5_cpuidle_init(void)
 | 
						|
{
 | 
						|
	return cpuidle_register(&imx5_cpuidle_driver, NULL);
 | 
						|
}
 |