display_timing.c 515 B

123456789101112131415161718192021222324
  1. /*
  2. * generic display timing functions
  3. *
  4. * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
  5. *
  6. * This file is released under the GPLv2
  7. */
  8. #include <linux/export.h>
  9. #include <linux/slab.h>
  10. #include <video/display_timing.h>
  11. void display_timings_release(struct display_timings *disp)
  12. {
  13. if (disp->timings) {
  14. unsigned int i;
  15. for (i = 0; i < disp->num_timings; i++)
  16. kfree(disp->timings[i]);
  17. kfree(disp->timings);
  18. }
  19. kfree(disp);
  20. }
  21. EXPORT_SYMBOL_GPL(display_timings_release);