Thomas Gleixner | 55716d2 | 2019-06-01 10:08:42 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Steffen Trumtrar | 8714c0c | 2012-12-17 14:20:17 +0100 | [diff] [blame] | 2 | /* |
| 3 | * generic display timing functions |
| 4 | * |
| 5 | * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix |
Steffen Trumtrar | 8714c0c | 2012-12-17 14:20:17 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <linux/export.h> |
| 9 | #include <linux/slab.h> |
| 10 | #include <video/display_timing.h> |
| 11 | |
| 12 | void display_timings_release(struct display_timings *disp) |
| 13 | { |
| 14 | if (disp->timings) { |
| 15 | unsigned int i; |
| 16 | |
| 17 | for (i = 0; i < disp->num_timings; i++) |
| 18 | kfree(disp->timings[i]); |
| 19 | kfree(disp->timings); |
| 20 | } |
| 21 | kfree(disp); |
| 22 | } |
| 23 | EXPORT_SYMBOL_GPL(display_timings_release); |