drivers: power: report battery voltage in AOSP compatible format
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / power / tuxonice_pageflags.c
1 /*
2 * kernel/power/tuxonice_pageflags.c
3 *
4 * Copyright (C) 2004-2010 Nigel Cunningham (nigel at tuxonice net)
5 *
6 * This file is released under the GPLv2.
7 *
8 * Routines for serialising and relocating pageflags in which we
9 * store our image metadata.
10 */
11
12 #include <linux/list.h>
13 #include <linux/module.h>
14 #include "tuxonice_pageflags.h"
15 #include "power.h"
16
17 int toi_pageflags_space_needed(void)
18 {
19 int total = 0;
20 struct bm_block *bb;
21
22 total = sizeof(unsigned int);
23
24 list_for_each_entry(bb, &pageset1_map->blocks, hook)
25 total += 2 * sizeof(unsigned long) + PAGE_SIZE;
26
27 return total;
28 }
29 EXPORT_SYMBOL_GPL(toi_pageflags_space_needed);