linux-2.6.33/framebuffer_alloc()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#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 s...
*
* @size: size of driver private data, can be zero
* @dev: pointer to the device for this fb, this can be ...
*
* Creates a new frame buffer info structure. Also reser...
* for driver private data (info->par). info->par (if an...
* aligned to sizeof(long).
*
* Returns the new structure, or NULL if an error occured.
*
*/
struct fb_info *framebuffer_alloc(size_t size, struct de...
{
#define BYTES_PER_LONG (BITS_PER_LONG/8)
#define PADDING (BYTES_PER_LONG - (sizeof(struct fb_info...
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]
終了行:
*参照元 [#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 s...
*
* @size: size of driver private data, can be zero
* @dev: pointer to the device for this fb, this can be ...
*
* Creates a new frame buffer info structure. Also reser...
* for driver private data (info->par). info->par (if an...
* aligned to sizeof(long).
*
* Returns the new structure, or NULL if an error occured.
*
*/
struct fb_info *framebuffer_alloc(size_t size, struct de...
{
#define BYTES_PER_LONG (BITS_PER_LONG/8)
#define PADDING (BYTES_PER_LONG - (sizeof(struct fb_info...
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]
ページ名: