This source file includes following definitions.
- found
- register_e820_pmem
1
2
3
4
5
6 #include <linux/platform_device.h>
7 #include <linux/init.h>
8 #include <linux/ioport.h>
9
10 static int found(struct resource *res, void *data)
11 {
12 return 1;
13 }
14
15 static __init int register_e820_pmem(void)
16 {
17 struct platform_device *pdev;
18 int rc;
19
20 rc = walk_iomem_res_desc(IORES_DESC_PERSISTENT_MEMORY_LEGACY,
21 IORESOURCE_MEM, 0, -1, NULL, found);
22 if (rc <= 0)
23 return 0;
24
25
26
27
28
29 pdev = platform_device_alloc("e820_pmem", -1);
30 return platform_device_add(pdev);
31 }
32 device_initcall(register_e820_pmem);