clkdev.h 460 B

12345678910111213141516171819202122232425
  1. #ifndef __ASM_MACH_CLKDEV_H
  2. #define __ASM_MACH_CLKDEV_H
  3. #include <linux/module.h>
  4. #include <asm/hardware/icst525.h>
  5. struct clk {
  6. unsigned long rate;
  7. struct module *owner;
  8. const struct icst525_params *params;
  9. void *data;
  10. void (*setvco)(struct clk *, struct icst525_vco vco);
  11. };
  12. static inline int __clk_get(struct clk *clk)
  13. {
  14. return try_module_get(clk->owner);
  15. }
  16. static inline void __clk_put(struct clk *clk)
  17. {
  18. module_put(clk->owner);
  19. }
  20. #endif