aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-picolcd.c
diff options
context:
space:
mode:
authorBruno Prémont <bonbons@linux-vserver.org>2010-04-11 06:17:45 -0400
committerJiri Kosina <jkosina@suse.cz>2010-04-11 14:26:46 -0400
commit5435f2818ea08bcb381dcd2a99b1607b2a42f329 (patch)
tree493f43cc5458e494a45d28ff776eea40880cb6c3 /drivers/hid/hid-picolcd.c
parenteb741103f17a19fccf7c795ed1d9662196acc6e5 (diff)
HID: hid-picolcd depends on LCD_CLASS_DEVICE
HID_PICOLCD should depend on LCD_CLASS_DEVICE, otherwise the build fails when HID_PICOLCD=y and LCD_CLASS_DEVICE=m: hid-picolcd.c:(.text+0x84523f): undefined reference to `lcd_device_unregister' hid-picolcd.c:(.text+0x8478ab): undefined reference to `lcd_device_register' hid-picolcd.c:(.text+0x84c15f): undefined reference to `lcd_device_unregister' Same applies to FB, BACKLIGHT_CLASS_DEVICE and LEDS_CLASS. Add suboptions for those features to handle the deps on kbuild side and just check HID_PICOLCD_* in the code. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-picolcd.c')
-rw-r--r--drivers/hid/hid-picolcd.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 0eacc6b6d5bb..0fbc7d396164 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -77,7 +77,7 @@
77#define REPORT_HOOK_VERSION 0xf7 /* LCD: IN[2], OUT[1] */ 77#define REPORT_HOOK_VERSION 0xf7 /* LCD: IN[2], OUT[1] */
78#define REPORT_EXIT_FLASHER 0xff /* Bootloader: OUT[2] */ 78#define REPORT_EXIT_FLASHER 0xff /* Bootloader: OUT[2] */
79 79
80#if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) 80#ifdef CONFIG_HID_PICOLCD_FB
81/* Framebuffer 81/* Framebuffer
82 * 82 *
83 * The PicoLCD use a Topway LCD module of 256x64 pixel 83 * The PicoLCD use a Topway LCD module of 256x64 pixel
@@ -128,7 +128,7 @@ static const struct fb_var_screeninfo picolcdfb_var = {
128 .bits_per_pixel = 1, 128 .bits_per_pixel = 1,
129 .grayscale = 1, 129 .grayscale = 1,
130}; 130};
131#endif /* CONFIG_FB */ 131#endif /* CONFIG_HID_PICOLCD_FB */
132 132
133/* Input device 133/* Input device
134 * 134 *
@@ -183,7 +183,7 @@ struct picolcd_data {
183 struct input_dev *input_cir; 183 struct input_dev *input_cir;
184 unsigned short keycode[PICOLCD_KEYS]; 184 unsigned short keycode[PICOLCD_KEYS];
185 185
186#if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) 186#ifdef CONFIG_HID_PICOLCD_FB
187 /* Framebuffer stuff */ 187 /* Framebuffer stuff */
188 u8 fb_update_rate; 188 u8 fb_update_rate;
189 u8 fb_bpp; 189 u8 fb_bpp;
@@ -191,21 +191,21 @@ struct picolcd_data {
191 u8 *fb_bitmap; /* framebuffer */ 191 u8 *fb_bitmap; /* framebuffer */
192 struct fb_info *fb_info; 192 struct fb_info *fb_info;
193 struct fb_deferred_io fb_defio; 193 struct fb_deferred_io fb_defio;
194#endif /* CONFIG_FB */ 194#endif /* CONFIG_HID_PICOLCD_FB */
195#if defined(CONFIG_LCD_CLASS_DEVICE) || defined(CONFIG_LCD_CLASS_DEVICE_MODULE) 195#ifdef CONFIG_HID_PICOLCD_LCD
196 struct lcd_device *lcd; 196 struct lcd_device *lcd;
197 u8 lcd_contrast; 197 u8 lcd_contrast;
198#endif 198#endif /* CONFIG_HID_PICOLCD_LCD */
199#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) 199#ifdef CONFIG_HID_PICOLCD_BACKLIGHT
200 struct backlight_device *backlight; 200 struct backlight_device *backlight;
201 u8 lcd_brightness; 201 u8 lcd_brightness;
202 u8 lcd_power; 202 u8 lcd_power;
203#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */ 203#endif /* CONFIG_HID_PICOLCD_BACKLIGHT */
204#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) 204#ifdef CONFIG_HID_PICOLCD_LEDS
205 /* LED stuff */ 205 /* LED stuff */
206 u8 led_state; 206 u8 led_state;
207 struct led_classdev *led[8]; 207 struct led_classdev *led[8];
208#endif /* CONFIG_LEDS_CLASS */ 208#endif /* CONFIG_HID_PICOLCD_LEDS */
209 209
210 /* Housekeeping stuff */ 210 /* Housekeeping stuff */
211 spinlock_t lock; 211 spinlock_t lock;
@@ -287,7 +287,7 @@ static struct picolcd_pending *picolcd_send_and_wait(struct hid_device *hdev,
287 return work; 287 return work;
288} 288}
289 289
290#if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) 290#ifdef CONFIG_HID_PICOLCD_FB
291/* Send a given tile to PicoLCD */ 291/* Send a given tile to PicoLCD */
292static int picolcd_fb_send_tile(struct hid_device *hdev, int chip, int tile) 292static int picolcd_fb_send_tile(struct hid_device *hdev, int chip, int tile)
293{ 293{
@@ -766,9 +766,9 @@ static void picolcd_exit_framebuffer(struct picolcd_data *data)
766{ 766{
767} 767}
768#define picolcd_fbinfo(d) NULL 768#define picolcd_fbinfo(d) NULL
769#endif /* CONFIG_FB */ 769#endif /* CONFIG_HID_PICOLCD_FB */
770 770
771#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) 771#ifdef CONFIG_HID_PICOLCD_BACKLIGHT
772/* 772/*
773 * backlight class device 773 * backlight class device
774 */ 774 */
@@ -864,9 +864,9 @@ static inline int picolcd_resume_backlight(struct picolcd_data *data)
864{ 864{
865 return 0; 865 return 0;
866} 866}
867#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */ 867#endif /* CONFIG_HID_PICOLCD_BACKLIGHT */
868 868
869#if defined(CONFIG_LCD_CLASS_DEVICE) || defined(CONFIG_LCD_CLASS_DEVICE_MODULE) 869#ifdef CONFIG_HID_PICOLCD_LCD
870/* 870/*
871 * lcd class device 871 * lcd class device
872 */ 872 */
@@ -957,9 +957,9 @@ static inline int picolcd_resume_lcd(struct picolcd_data *data)
957{ 957{
958 return 0; 958 return 0;
959} 959}
960#endif /* CONFIG_LCD_CLASS_DEVICE */ 960#endif /* CONFIG_HID_PICOLCD_LCD */
961 961
962#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) 962#ifdef CONFIG_HID_PICOLCD_LEDS
963/** 963/**
964 * LED class device 964 * LED class device
965 */ 965 */
@@ -1104,7 +1104,7 @@ static inline int picolcd_leds_set(struct picolcd_data *data)
1104{ 1104{
1105 return 0; 1105 return 0;
1106} 1106}
1107#endif /* CONFIG_LEDS_CLASS */ 1107#endif /* CONFIG_HID_PICOLCD_LEDS */
1108 1108
1109/* 1109/*
1110 * input class device 1110 * input class device
@@ -1243,10 +1243,10 @@ static int picolcd_reset(struct hid_device *hdev)
1243 1243
1244 picolcd_resume_lcd(data); 1244 picolcd_resume_lcd(data);
1245 picolcd_resume_backlight(data); 1245 picolcd_resume_backlight(data);
1246#if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) 1246#ifdef CONFIG_HID_PICOLCD_FB
1247 if (data->fb_info) 1247 if (data->fb_info)
1248 schedule_delayed_work(&data->fb_info->deferred_work, 0); 1248 schedule_delayed_work(&data->fb_info->deferred_work, 0);
1249#endif /* CONFIG_FB */ 1249#endif /* CONFIG_HID_PICOLCD_FB */
1250 1250
1251 picolcd_leds_set(data); 1251 picolcd_leds_set(data);
1252 return 0; 1252 return 0;