提交 5ec96538 编写于 作者: E Ezequiel Garcia 提交者: Tomi Valkeinen

fbdev: Make fb-notify a no-op if CONFIG_FB=n

There's no point in having support for framebuffer notifications
is CONFIG_FB is disabled. This commit adds the necessary stubs
for code to link properly when CONFIG_FB=n and moves fb-notify.o
to be built only when CONFIG_FB=y.
Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 c3c296b0
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
menuconfig FB menuconfig FB
tristate "Support for frame buffer devices" tristate "Support for frame buffer devices"
select FB_CMDLINE select FB_CMDLINE
select FB_NOTIFY
---help--- ---help---
The frame buffer device provides an abstraction for the graphics The frame buffer device provides an abstraction for the graphics
hardware. It represents the frame buffer of some video hardware and hardware. It represents the frame buffer of some video hardware and
...@@ -56,6 +57,9 @@ config FIRMWARE_EDID ...@@ -56,6 +57,9 @@ config FIRMWARE_EDID
config FB_CMDLINE config FB_CMDLINE
bool bool
config FB_NOTIFY
bool
config FB_DDC config FB_DDC
tristate tristate
depends on FB depends on FB
......
obj-y += fb_notify.o
obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o
obj-$(CONFIG_FB_NOTIFY) += fb_notify.o
obj-$(CONFIG_FB) += fb.o obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
modedb.o fbcvt.o modedb.o fbcvt.o
......
...@@ -175,9 +175,27 @@ struct fb_blit_caps { ...@@ -175,9 +175,27 @@ struct fb_blit_caps {
u32 flags; u32 flags;
}; };
#ifdef CONFIG_FB_NOTIFY
extern int fb_register_client(struct notifier_block *nb); extern int fb_register_client(struct notifier_block *nb);
extern int fb_unregister_client(struct notifier_block *nb); extern int fb_unregister_client(struct notifier_block *nb);
extern int fb_notifier_call_chain(unsigned long val, void *v); extern int fb_notifier_call_chain(unsigned long val, void *v);
#else
static inline int fb_register_client(struct notifier_block *nb)
{
return 0;
};
static inline int fb_unregister_client(struct notifier_block *nb)
{
return 0;
};
static inline int fb_notifier_call_chain(unsigned long val, void *v)
{
return 0;
};
#endif
/* /*
* Pixmap structure definition * Pixmap structure definition
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册