clkdev.h 722 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 2010 Paul Mundt <lethal@linux-sh.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * Helper for the clk API to assist looking up a struct clk.
  9. */
  10. #ifndef __CLKDEV__H_
  11. #define __CLKDEV__H_
  12. #include <linux/bootmem.h>
  13. #include <linux/mm.h>
  14. #include <linux/slab.h>
  15. #include <asm/clock.h>
  16. static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
  17. {
  18. if (!slab_is_available())
  19. return alloc_bootmem_low_pages(size);
  20. else
  21. return kzalloc(size, GFP_KERNEL);
  22. }
  23. #define __clk_put(clk)
  24. #define __clk_get(clk) ({ 1; })
  25. #endif /* __CLKDEV_H__ */