*参照元 [#babb570b]
#backlinks

*説明 [#p193d032]
-パス: [[linux-2.6.33/drivers/video/fbsysfs.c]]

-FIXME: これは何?
--説明


**引数 [#i5417816]
-size_t size
--
-struct device *dev
--
--[[linux-2.6.33/device]]


**返り値 [#i31ba05a]
-struct fb_info *
--
--[[linux-2.6.33/fb_info]]


**参考 [#le6f3e5d]


*実装 [#u0d5538d]
 /**
  * framebuffer_alloc - creates a new frame buffer info structure
  *
  * @size: size of driver private data, can be zero
  * @dev: pointer to the device for this fb, this can be NULL
  *
  * Creates a new frame buffer info structure. Also reserves @size bytes
  * for driver private data (info->par). info->par (if any) will be
  * aligned to sizeof(long).
  *
  * Returns the new structure, or NULL if an error occured.
  *
  */
 struct fb_info *framebuffer_alloc(size_t size, struct device *dev)
 {
 #define BYTES_PER_LONG (BITS_PER_LONG/8)
 #define PADDING (BYTES_PER_LONG - (sizeof(struct fb_info) % BYTES_PER_LONG))
 	int fb_info_size = sizeof(struct fb_info);
 	struct fb_info *info;
 	char *p;
 
 	if (size)
 		fb_info_size += PADDING;
 
 	p = kzalloc(fb_info_size + size, GFP_KERNEL);
 
 	if (!p)
 		return NULL;
 
-
--[[linux-2.6.33/kzalloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]

 	info = (struct fb_info *) p;
 
 	if (size)
 		info->par = p + fb_info_size;
 
 	info->device = dev;
 
 #ifdef CONFIG_FB_BACKLIGHT
 	mutex_init(&info->bl_curve_mutex);
 #endif
 
-
--[[linux-2.6.33/CONFIG_FB_BACKLIGHT]]
-
--[[linux-2.6.33/mutex_init()]]

 	return info;
 #undef PADDING
 #undef BYTES_PER_LONG
 }
 EXPORT_SYMBOL(framebuffer_alloc);
-モジュールのライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#xe29dfe5]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS