From patchwork Fri May 12 19:39:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9724847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEDD6600CB for ; Fri, 12 May 2017 19:39:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4BA828736 for ; Fri, 12 May 2017 19:39:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C988C2888D; Fri, 12 May 2017 19:39:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B0432888B for ; Fri, 12 May 2017 19:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757191AbdELTjY (ORCPT ); Fri, 12 May 2017 15:39:24 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35265 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756211AbdELTjX (ORCPT ); Fri, 12 May 2017 15:39:23 -0400 Received: by mail-oi0-f67.google.com with SMTP id m17so10266494oik.2; Fri, 12 May 2017 12:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0HrSVJuQmp7gkDUpVL22zyVVTw3gL/Som6xLn6G00q4=; b=SU9uVDZgkvC1b8IEUeZXxxIrqZHO5uWQu7dFt84msnPZsf0wYN0VWo0IE/C5rtF5TZ LrYH2woxLRYWQQp8p5xxLvhe0XKKRG4Bqwv7fjVWncoZSXaWpY+Q4g/oFa+CKOpr3BLf /yZYyS2UZUszrL7l9z+zqu0NPpcOYlOO9HuAFztUsOSulYIWgtL7L662oYuRXl8YV+Wr NcQYqiDwVV9dm9YO+ktBUkyA4syJ7pDP8g5JFkoeRyqRHGO4/5nWy3MCs35lgZPZN9+9 4PEecklJzQDrIU3QIFFtVo36t+2fAU9UV24+5CWCyEVInP4fw+YZ5I0HMYmwElYpavL6 bA2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0HrSVJuQmp7gkDUpVL22zyVVTw3gL/Som6xLn6G00q4=; b=BWE4ICB+OFnbS3K/WBf1KZcBEFDUjhk6Ne5Qk0clPs7K0kFzR0LxwgR7UdobQbPWOT Tsch043jq1hHZab6HWuvzYOMrNdDVG3XcBR0wS6ok2XC9Bd1VXymThZBA/s5C83bVZYD ox88DChRAXE3z1DJOx1dR+IONyJE3pSG1WoZzz4unkQrF3xUV7erRvaMqstAlEAcy2X2 SQ79j+aLYRFgY6SjDNv5lGVjDttoMg5GZsWG4F1QcGeU5P/TvHmtHuBj4fF8yu8dychP RQHMbNCN9/jRnkDivQZ16cFOJwWwDdoL2abEWPwOnfa2NiA0UIbmffTLvQ6pqD4eHNNK WM4w== X-Gm-Message-State: AODbwcDT9taGdQGQwsyvyr6udqo+Z0nl/kEx4uozOpusLVtq0nnUICHV 0x6+oCM4dwH1hH8aCDXXeO9GqtV1mA== X-Received: by 10.157.12.42 with SMTP id 39mr2951456otr.71.1494617962261; Fri, 12 May 2017 12:39:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.66.2 with HTTP; Fri, 12 May 2017 12:39:21 -0700 (PDT) In-Reply-To: <632c9564-97f3-7e43-11a5-222ba835889d@xs4all.nl> References: <20170421105224.899350-1-arnd@arndb.de> <632c9564-97f3-7e43-11a5-222ba835889d@xs4all.nl> From: Arnd Bergmann Date: Fri, 12 May 2017 21:39:21 +0200 X-Google-Sender-Auth: MRIhKD-VlomhB75v1kBweub1_eI Message-ID: Subject: Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies To: Hans Verkuil Cc: Hans Verkuil , Mauro Carvalho Chehab , Benjamin Gaignard , linux-media@vger.kernel.org, Linux Kernel Mailing List Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, May 12, 2017 at 12:00 PM, Hans Verkuil wrote: > On 05/12/17 11:49, Arnd Bergmann wrote: >> I can probably come up with a workaround, but haven't completely thought >> through all the combinations yet. Also, I assume the same fix will be needed >> for exynos, though that has not come up in randconfig testing so far. > > Try this patch: > > Signed-off-by: Hans Verkuil > --- > diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h > index eb50ce54b759..da3528c8edb9 100644 > --- a/include/media/cec-notifier.h > +++ b/include/media/cec-notifier.h > @@ -29,7 +29,7 @@ struct edid; > struct cec_adapter; > struct cec_notifier; > > -#ifdef CONFIG_MEDIA_CEC_NOTIFIER > +#if IS_REACHABLE(CONFIG_MEDIA_CEC_NOTIFIER) > This misses how CONFIG_MEDIA_CEC_NOTIFIER is just a 'bool' option to the 'MEDIA_CEC_CORE' symbol that controls whether the code is built-in or in a module, and it lacks helpers for cec_notifier_{un,}register. The version below seems to work, though I don't particularly like the IS_REACHABLE() addition since that can be confusing to users. Signed-off-by: Arnd Bergmann #endif diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h index eb50ce54b759..69f7d8eed1b0 100644 --- a/include/media/cec-notifier.h +++ b/include/media/cec-notifier.h @@ -29,7 +29,7 @@ struct edid; struct cec_adapter; struct cec_notifier; -#ifdef CONFIG_MEDIA_CEC_NOTIFIER +#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_MEDIA_CEC_NOTIFIER) /** * cec_notifier_get - find or create a new cec_notifier for the given device. @@ -106,6 +106,17 @@ static inline void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n, { } +static inline void cec_notifier_register(struct cec_notifier *n, + struct cec_adapter *adap, + void (*callback)(struct cec_adapter *adap, u16 pa)) +{ +} + +static inline void cec_notifier_unregister(struct cec_notifier *n) +{ +} + + #endif