diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-08-04 09:22:11 -0400 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-08-06 08:13:08 -0400 |
| commit | 2c4124fdeaea4b70120da3bddf90c4587e65bbc6 (patch) | |
| tree | e41ed501448404d6e5db71f4c4327636eb36c9d9 /drivers/gpu | |
| parent | 3d9e35a92e935e1f968e79f0e0b72ce4b9f14c3e (diff) | |
drm/fb-helper: Move drm_fb_helper_force_kernel_mode() inside #ifdef
If CONFIG_MAGIC_SYSRQ is not set:
drivers/gpu/drm/drm_fb_helper.c:390:13: warning: 'drm_fb_helper_force_kernel_mode' defined but not used [-Wunused-function]
static bool drm_fb_helper_force_kernel_mode(void)
^
Move drm_fb_helper_force_kernel_mode() inside the existing #ifdef to fix
this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 7278c23ea98b..5875059a7625 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
| @@ -383,6 +383,31 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) | |||
| 383 | } | 383 | } |
| 384 | EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked); | 384 | EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked); |
| 385 | 385 | ||
| 386 | static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper) | ||
| 387 | { | ||
| 388 | struct drm_device *dev = fb_helper->dev; | ||
| 389 | struct drm_crtc *crtc; | ||
| 390 | int bound = 0, crtcs_bound = 0; | ||
| 391 | |||
| 392 | /* Sometimes user space wants everything disabled, so don't steal the | ||
| 393 | * display if there's a master. */ | ||
| 394 | if (dev->primary->master) | ||
| 395 | return false; | ||
| 396 | |||
| 397 | drm_for_each_crtc(crtc, dev) { | ||
| 398 | if (crtc->primary->fb) | ||
| 399 | crtcs_bound++; | ||
| 400 | if (crtc->primary->fb == fb_helper->fb) | ||
| 401 | bound++; | ||
| 402 | } | ||
| 403 | |||
| 404 | if (bound < crtcs_bound) | ||
| 405 | return false; | ||
| 406 | |||
| 407 | return true; | ||
| 408 | } | ||
| 409 | |||
| 410 | #ifdef CONFIG_MAGIC_SYSRQ | ||
| 386 | /* | 411 | /* |
| 387 | * restore fbcon display for all kms driver's using this helper, used for sysrq | 412 | * restore fbcon display for all kms driver's using this helper, used for sysrq |
| 388 | * and panic handling. | 413 | * and panic handling. |
| @@ -410,31 +435,6 @@ static bool drm_fb_helper_force_kernel_mode(void) | |||
| 410 | return error; | 435 | return error; |
| 411 | } | 436 | } |
| 412 | 437 | ||
| 413 | static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper) | ||
| 414 | { | ||
| 415 | struct drm_device *dev = fb_helper->dev; | ||
| 416 | struct drm_crtc *crtc; | ||
| 417 | int bound = 0, crtcs_bound = 0; | ||
| 418 | |||
| 419 | /* Sometimes user space wants everything disabled, so don't steal the | ||
| 420 | * display if there's a master. */ | ||
| 421 | if (dev->primary->master) | ||
| 422 | return false; | ||
| 423 | |||
| 424 | drm_for_each_crtc(crtc, dev) { | ||
| 425 | if (crtc->primary->fb) | ||
| 426 | crtcs_bound++; | ||
| 427 | if (crtc->primary->fb == fb_helper->fb) | ||
| 428 | bound++; | ||
| 429 | } | ||
| 430 | |||
| 431 | if (bound < crtcs_bound) | ||
| 432 | return false; | ||
| 433 | |||
| 434 | return true; | ||
| 435 | } | ||
| 436 | |||
| 437 | #ifdef CONFIG_MAGIC_SYSRQ | ||
| 438 | static void drm_fb_helper_restore_work_fn(struct work_struct *ignored) | 438 | static void drm_fb_helper_restore_work_fn(struct work_struct *ignored) |
| 439 | { | 439 | { |
| 440 | bool ret; | 440 | bool ret; |
