From patchwork Sun Oct 25 22:59:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 7484301 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 394519F399 for ; Sun, 25 Oct 2015 23:03:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AABA207CA for ; Sun, 25 Oct 2015 23:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1686620726 for ; Sun, 25 Oct 2015 23:03:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061AbbJYXDZ (ORCPT ); Sun, 25 Oct 2015 19:03:25 -0400 Received: from mail-qk0-f173.google.com ([209.85.220.173]:36119 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbbJYXDY (ORCPT ); Sun, 25 Oct 2015 19:03:24 -0400 Received: by qkfq3 with SMTP id q3so7151038qkf.3 for ; Sun, 25 Oct 2015 16:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur_com_ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ncNYFjCi8xQqwFokKf+MA3KsBr8+Mc+c/lNPOIWo2tU=; b=Bw1GTrmQnsOdH06fvj4g+C46UeXmLtq7JrixKkVlaaPny/lQZvA4TAm7yVeJLCaafW sHK6bhAVH9OLTXnEOz0F2CFgAg6lhuZGjfXgoYgbLbFhdetIniPee+VDh1YY4cXcXBZC fmQQasiqmWm4aWDvEV4OAldWGZYrhMaQFfp+kX5jbMX0yqp8xXZ1cY4uMLeQRo8SJBz+ AnvNlmbKRSccmwuYSCBYyJvjfWKtWfmGvvc5YbVNz29ypVyLOUuKxHUMY+D98f5icavU GM99P94fyAd0KlFVC0dIRph79XSsyomClhnwbh7TU8JY64/MgKnMNsXlOobU9K0WDSwW U5KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ncNYFjCi8xQqwFokKf+MA3KsBr8+Mc+c/lNPOIWo2tU=; b=AHjnLSra6POHab0vpS2BNC0aU3Pc1ttltFTsTXLy+Mn4nvOlr9IT4Qwry8D86wP4a9 WyAL9xzrpL5+Z6UOSqQQf9dTDk+BNzpTklnZFUjUSc0YRSHkXyNPr1y/WRXS2tEi+ZT5 rSiZnqFzXdqrRNGLR8ajFyHFkXLnaMk/jVtyK777bQ4y5cp9lheyg5TvParqKlOKmSBi oXQP6c432eZ88NH6i3/RDGGJRC2KGghh6wCq5+7FQuOv/Is97Zwvk7y7l8GqkV/1pNt5 dh0lTn6Y+wMzB0BKYvSfS9/xIOgsH2NSyTKPlcHguxWvnjiv3jYZ+ZRaxoO5APlifkQR zQJw== X-Gm-Message-State: ALoCoQmQ04fUawePGao72GC2y39RQ4ZUPfqM0p5q0w3mhT1IIHoZPGotXap31RZsPA74rmK5G0rK X-Received: by 10.55.204.156 with SMTP id n28mr30534809qkl.38.1445814204049; Sun, 25 Oct 2015 16:03:24 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id p193sm11900854qha.29.2015.10.25.16.03.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Oct 2015 16:03:22 -0700 (PDT) From: Ezequiel Garcia To: linux-fbdev@vger.kernel.org Cc: tomi.valkeinen@ti.com, Ezequiel Garcia Subject: [PATCH] fbdev: Make fb-notify a no-op if CONFIG_FB=n Date: Sun, 25 Oct 2015 19:59:17 -0300 Message-Id: <1445813957-3750-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.5.2 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/video/fbdev/Kconfig | 4 ++++ drivers/video/fbdev/core/Makefile | 2 +- include/linux/fb.h | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 8b1d371b5404..031063223698 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -5,6 +5,7 @@ menuconfig FB tristate "Support for frame buffer devices" select FB_CMDLINE + select FB_NOTIFY ---help--- The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and @@ -56,6 +57,9 @@ config FIRMWARE_EDID config FB_CMDLINE bool +config FB_NOTIFY + bool + config FB_DDC tristate 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 @@ -obj-y += fb_notify.o obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o +obj-$(CONFIG_FB_NOTIFY) += fb_notify.o obj-$(CONFIG_FB) += fb.o fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ modedb.o fbcvt.o diff --git a/include/linux/fb.h b/include/linux/fb.h index bc9afa74ee11..760fb956a00f 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -175,9 +175,27 @@ struct fb_blit_caps { u32 flags; }; +#ifdef CONFIG_FB_NOTIFY extern int fb_register_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); +#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 *