diff options
author | Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | 2015-11-24 22:11:48 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-12-15 08:41:24 -0500 |
commit | 5ec9653806baa5928ee01109004411e3bed376f2 (patch) | |
tree | 60d28a5ce677ea7bba199ecff10fece4704df275 | |
parent | c3c296b069dd84264cbaf7a0c4c13783e7508d50 (diff) |
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: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/fbdev/Kconfig | 4 | ||||
-rw-r--r-- | drivers/video/fbdev/core/Makefile | 2 | ||||
-rw-r--r-- | include/linux/fb.h | 18 |
3 files changed, 23 insertions, 1 deletions
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 1727a964aea5..d43f27682d02 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig | |||
@@ -5,6 +5,7 @@ | |||
5 | menuconfig FB | 5 | menuconfig FB |
6 | tristate "Support for frame buffer devices" | 6 | tristate "Support for frame buffer devices" |
7 | select FB_CMDLINE | 7 | select FB_CMDLINE |
8 | select FB_NOTIFY | ||
8 | ---help--- | 9 | ---help--- |
9 | The frame buffer device provides an abstraction for the graphics | 10 | The frame buffer device provides an abstraction for the graphics |
10 | hardware. It represents the frame buffer of some video hardware and | 11 | hardware. It represents the frame buffer of some video hardware and |
@@ -56,6 +57,9 @@ config FIRMWARE_EDID | |||
56 | config FB_CMDLINE | 57 | config FB_CMDLINE |
57 | bool | 58 | bool |
58 | 59 | ||
60 | config FB_NOTIFY | ||
61 | bool | ||
62 | |||
59 | config FB_DDC | 63 | config FB_DDC |
60 | tristate | 64 | tristate |
61 | depends on FB | 65 | depends on FB |
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile index 23d86a8b7d7b..9e3ddf225393 100644 --- a/drivers/video/fbdev/core/Makefile +++ b/drivers/video/fbdev/core/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y += fb_notify.o | ||
2 | obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o | 1 | obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o |
2 | obj-$(CONFIG_FB_NOTIFY) += fb_notify.o | ||
3 | obj-$(CONFIG_FB) += fb.o | 3 | obj-$(CONFIG_FB) += fb.o |
4 | fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ | 4 | fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ |
5 | modedb.o fbcvt.o | 5 | modedb.o fbcvt.o |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 3d003805aac3..55433f86f0a3 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -175,9 +175,27 @@ struct fb_blit_caps { | |||
175 | u32 flags; | 175 | u32 flags; |
176 | }; | 176 | }; |
177 | 177 | ||
178 | #ifdef CONFIG_FB_NOTIFY | ||
178 | extern int fb_register_client(struct notifier_block *nb); | 179 | extern int fb_register_client(struct notifier_block *nb); |
179 | extern int fb_unregister_client(struct notifier_block *nb); | 180 | extern int fb_unregister_client(struct notifier_block *nb); |
180 | extern int fb_notifier_call_chain(unsigned long val, void *v); | 181 | extern int fb_notifier_call_chain(unsigned long val, void *v); |
182 | #else | ||
183 | static inline int fb_register_client(struct notifier_block *nb) | ||
184 | { | ||
185 | return 0; | ||
186 | }; | ||
187 | |||
188 | static inline int fb_unregister_client(struct notifier_block *nb) | ||
189 | { | ||
190 | return 0; | ||
191 | }; | ||
192 | |||
193 | static inline int fb_notifier_call_chain(unsigned long val, void *v) | ||
194 | { | ||
195 | return 0; | ||
196 | }; | ||
197 | #endif | ||
198 | |||
181 | /* | 199 | /* |
182 | * Pixmap structure definition | 200 | * Pixmap structure definition |
183 | * | 201 | * |