mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
![Russell King](/assets/img/avatar_default.png)
People often point to the Integrator/Versatile/Realview implementations to justify using the consumer name as the sole selector for clocks. Eliminate this excuse by changing the Integrator implementation, so it provides a better example of how it should be done. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
25 lines
460 B
C
25 lines
460 B
C
#ifndef __ASM_MACH_CLKDEV_H
|
|
#define __ASM_MACH_CLKDEV_H
|
|
|
|
#include <linux/module.h>
|
|
#include <asm/hardware/icst525.h>
|
|
|
|
struct clk {
|
|
unsigned long rate;
|
|
struct module *owner;
|
|
const struct icst525_params *params;
|
|
void *data;
|
|
void (*setvco)(struct clk *, struct icst525_vco vco);
|
|
};
|
|
|
|
static inline int __clk_get(struct clk *clk)
|
|
{
|
|
return try_module_get(clk->owner);
|
|
}
|
|
|
|
static inline void __clk_put(struct clk *clk)
|
|
{
|
|
module_put(clk->owner);
|
|
}
|
|
|
|
#endif
|