From patchwork Wed Nov 25 03:11:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 7695001 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D7282BF90C for ; Wed, 25 Nov 2015 03:16:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9F5E2062C for ; Wed, 25 Nov 2015 03:16:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 850E02062B for ; Wed, 25 Nov 2015 03:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754746AbbKYDQI (ORCPT ); Tue, 24 Nov 2015 22:16:08 -0500 Received: from mail-qk0-f173.google.com ([209.85.220.173]:36720 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754706AbbKYDQH (ORCPT ); Tue, 24 Nov 2015 22:16:07 -0500 Received: by qkda6 with SMTP id a6so12232561qkd.3 for ; Tue, 24 Nov 2015 19:16:05 -0800 (PST) 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=k2Y+kjTzLfjVhyM0nBkvalOsvbBz7lbMd4pHEmrHHXc=; b=xSxSfR676p059jnvsZftC0L2yCdNA7FZd43N7h6gWK7QfKfTpw0hyxiel1hTayz4Nb DBdCQYxEyu//O5wQBFaDAEvA3khxMArh90dVWjrSFZQcTEWPrBJnA78ZgqXyhVhHvzpf FPHZGAfvn+jQnicXAKZUMTuWBbDSB7Ph9T/SY2eUaLbOcsv7DyaG3wstT++jgkULz9EY l5A/Y2WZ4a5SQV5tqBAOsc8P6VkFVBX9Xu7X0TtPtcNK9WJst3pO79RTxcwC9Tvr0y5+ q4o7VtGatwWjHzRczExYeVI1VSVYC8yEMPFUI+VD8BogSHhcM0uaN8ZQyAf841Xb+EK1 /19g== 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=k2Y+kjTzLfjVhyM0nBkvalOsvbBz7lbMd4pHEmrHHXc=; b=F3DJhiL+138Tg56BXcUZ03+Rk2bKBD5GlAlAOvUI4ijI1gP3cGkVpNB2WQMN6EBkZf uXSv3BYtCs8mT2RutQfCZQKdV4dyVl2ymjQcWHIJjp2c1yg8+fpigV7/J1uYdg7Xncwf WoVuSdPxUPdmAl9th1eVCBzKkhcgOtnAAZgIAqhaLGg7uf8fMNPRgKPhBbltEY8VyEmX 2oSZQVv/mpFgr4ULP+W1wIVd8XujGKGwR4BZ8eTE4YQgeVR84UITXNXDARU14cjPvImn Eoq//1fNpY/gk7PQiLNIIyTCnBjuwVp0eSA7UkrC1pa07TI956gsCYCQZNJAGRekelhL s09A== X-Gm-Message-State: ALoCoQn+4sg6QrJ/nceFTLTaXmhS61sblLEa0Z/GItGPudkNjufstKCT1jPrCOioqRuZaNEjTm96 X-Received: by 10.55.78.16 with SMTP id c16mr10503623qkb.95.1448421365884; Tue, 24 Nov 2015 19:16:05 -0800 (PST) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id y200sm4932136qhb.6.2015.11.24.19.16.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 19:16:04 -0800 (PST) From: Ezequiel Garcia To: linux-fbdev@vger.kernel.org, tomi.valkeinen@ti.com Cc: Ezequiel Garcia Subject: [PATCH RESEND] fbdev: Make fb-notify a no-op if CONFIG_FB=n Date: Wed, 25 Nov 2015 00:11:48 -0300 Message-Id: <1448421108-3437-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.6.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=-7.4 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 e6d16d65e4e6..6d881260856e 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 3d003805aac3..55433f86f0a3 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 *