aboutsummaryrefslogtreecommitdiffstats
path: root/test-mergesort.c
blob: 3f388b4ce0bde90ff5593b42948338d5b73e8da9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "cache.h"
#include "mergesort.h"

struct line {
	char *text;
	struct line *next;
};

static void *get_next(const void *a)
{
	return ((const struct line *)a)->next;
}

static void set_next(void *a, void *b)
{
	((struct line *)a)->next = b;
}

static int compare_strings(const void *a, const void *b)
{
	const struct line *x = a, *y = b;
	return strcmp(x->text, y->text);
}

int main(int argc, const char **argv)
{
	struct line *line, *p = NULL, *lines = NULL;
	struct strbuf sb = STRBUF_INIT;

	for (;;) {
		if (strbuf_getwholeline(&sb, stdin, '\n'))
			break;
		line = xmalloc(sizeof(struct line));
		line->text = strbuf_detach(&sb, NULL);
		if (p) {
			line->next = p->next;
			p->next = line;
		} else {
			line->next = NULL;
			lines = line;
		}
		p = line;
	}

	lines = llist_mergesort(lines, get_next, set_next, compare_strings);

	while (lines) {
		printf("%s", lines->text);
		lines = lines->next;
	}
	return 0;
}
35'>chromeos-4.4__release/core76-35 Intel wireless group's fork of linux.gitIntel wireless group
aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAjay Kumar <ajaykumar.rs@samsung.com>2014-02-12 11:32:30 +0900
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-02-19 18:27:36 +0000
commit8754d59563b30ad1a21fbeda4d09595fae5ae660 (patch)
treedb71eac3e4447d05dab810ccbddac065470cd172 /Documentation
parent81dbfa2fa9d8c4d1fd63ed0129009229068fd37e (diff)
downloadchromeos-8754d59563b30ad1a21fbeda4d09595fae5ae660.tar.gz
drm: exynos: Add powerup/down routines for eDP panel
Add powerup and powerdown routines for eDP panel, and integrate the same with the exynos DP driver. The panel powerup/down routines can be used to set all related GPIO and regulator settings for the eDP panel, like: --regulator fet for LCD --regulator fet for LED --LCD_EN signal --BL_EN signal --Delay needed for complete powerup --Delay needed for complete powerdown The above settings required for panel powerup/down can be added via DP DT bindings. BUG=chrome-os-partner:24914, chrome-os-partner:24672, chrome-os-partner:25567 TEST=Boot an peach-pi and pit. Check for smooth display transitions during bootup, DPMS and S2R calls. Also, on peach-pi, observe that the FET for LCD and LED are down during DPMS_OFF using the following commands: i2cget -f -y 20 0x48 0x0f => 0x0e i2cget -f -y 20 0x48 0x14 => 0x0e Change-Id: Ie9223a0543fa053690b6d56f0e162b3d5087fb0c Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/182454 Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Jaehoon Kim <jh228.kim@samsung.com> Tested-by: Doug Anderson <dianders@chromium.org> Commit-Queue: Wonjoon Lee <woojoo.lee@samsung.com>