aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernie Thompson <bernie@plugable.com>2010-02-15 09:46:35 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 19:43:00 -0500
commitdd8015f1c83bfde9966c86a5958abd466a304398 (patch)
tree3f83751a5cecca7f416909db8471cf5ce3004d0c
parent3e8f3d6fa672896096068296658a769649186150 (diff)
Staging: udlfb: explicit dependencies and warnings
Specify Kconfig dependencies, and include warnings for building as a module udlfb is dependent on FB_DEFERRED_IO, FB_SYS_*, and FB_MODE_HELPERS Because many kernels do not include defio (which cannot be built as a module), yet users want to be able to build udlfb as a module later, udlfb has ifdefs and these dependency warnings to help udlfb build with or without certain dependencies, but also print warnings for any lost function. Even though this kind of flexibility isn't common, we've gotten feedback from a significant portion of users that they were frustrated without it. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/udlfb/Kconfig14
-rw-r--r--drivers/staging/udlfb/udlfb.c14
2 files changed, 24 insertions, 4 deletions
diff --git a/drivers/staging/udlfb/Kconfig b/drivers/staging/udlfb/Kconfig
index 641692da0e4f..65bd5db4ca56 100644
--- a/drivers/staging/udlfb/Kconfig
+++ b/drivers/staging/udlfb/Kconfig
@@ -1,8 +1,14 @@
1config FB_UDL 1config FB_UDL
2 tristate "Displaylink USB Framebuffer support" 2 tristate "Displaylink USB Framebuffer support"
3 depends on FB && USB 3 depends on FB && USB
4 select FB_MODE_HELPERS
5 select FB_SYS_FILLRECT
6 select FB_SYS_COPYAREA
7 select FB_SYS_IMAGEBLIT
8 select FB_SYS_FOPS
9 select FB_DEFERRED_IO
4 ---help--- 10 ---help---
5 This is an experimental driver for DisplayLink USB devices 11 This is a kernel framebuffer driver for DisplayLink USB devices.
6 that provides a framebuffer device. A normal framebuffer can 12 Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
7 be used with this driver, or xorg can be run on the device 13 mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices.
8 using it. 14 To compile as a module, choose M here: the module name is udlfb.
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 939b8faba0ff..baad03a8a873 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -56,6 +56,20 @@ static struct usb_device_id id_table[] = {
56}; 56};
57MODULE_DEVICE_TABLE(usb, id_table); 57MODULE_DEVICE_TABLE(usb, id_table);
58 58
59#ifndef CONFIG_FB_DEFERRED_IO
60#warning message "kernel FB_DEFFERRED_IO option to support generic fbdev apps"
61#endif
62
63#ifndef CONFIG_FB_SYS_IMAGEBLIT
64#ifndef CONFIG_FB_SYS_IMAGEBLIT_MODULE
65#warning message "FB_SYS_* in kernel or module option to support fb console"
66#endif
67#endif
68
69#ifndef CONFIG_FB_MODE_HELPERS
70#warning message "kernel FB_MODE_HELPERS required. Expect build break"
71#endif
72
59/* dlfb keeps a list of urbs for efficient bulk transfers */ 73/* dlfb keeps a list of urbs for efficient bulk transfers */
60static void dlfb_urb_completion(struct urb *urb); 74static void dlfb_urb_completion(struct urb *urb);
61static struct urb *dlfb_get_urb(struct dlfb_data *dev); 75static struct urb *dlfb_get_urb(struct dlfb_data *dev);