23,217
社区成员




diff --git a/include/linux/fb.h b/include/linux/fb.h
【这儿表示一个小段的开始】
index c10163b..1296af4 100644
--- a/include/linux/fb.h (一般表示原文件,a是原文件对应的目录)
+++ b/include/linux/fb.h (一般表示改动过的文件,b是其目录名,所以可以直接看他们的下层目录来找)
@@ -403,6 +403,7 @@ struct fb_cursor {
#include <linux/notifier.h>
#include <linux/list.h>
#include <linux/backlight.h>
+#include <linux/slab.h>
【+表示增加一行】
#include <asm/io.h>
struct vm_area_struct;
@@ -862,10 +863,22 @@ struct fb_info {
【@@ -862... 此处表示对应该文件的多少行多少列】
/* we need the PCI or similiar aperture base/size not
smem_start/size as smem_start may just be an object
allocated inside the aperture so may not actually overlap */
- resource_size_t aperture_base;
- resource_size_t aperture_size;
【-表示删除改行】
+ struct apertures_struct {
+ unsigned int count;
+ struct aperture {
+ resource_size_t base;
+ resource_size_t size;
+ } ranges[0];
+ } *apertures;
};
+static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
+ struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
+ + max_num * sizeof(struct aperture), GFP_KERNEL);
+ a->count = max_num;
+ return a;
+}
+
#ifdef MODULE
#define FBINFO_DEFAULT FBINFO_MODULE
#else