Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640712
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies |
| Date | 2017-05-12 21:40 +0200 |
| Message-ID | <tGozU-Ud-23@gated-at.bofh.it> (permalink) |
| References | <tyEs9-4NC-13@gated-at.bofh.it> <tGfwC-2A6-13@gated-at.bofh.it> <tGfGh-2Tv-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, May 12, 2017 at 12:00 PM, Hans Verkuil <hverkuil@xs4all.nl> 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 <hans.verkuil@cisco.com>
> ---
> 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 <arnd@arndb.de>
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
#endif
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies Arnd Bergmann <arnd@arndb.de> - 2017-05-12 12:00 +0200
Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-12 12:10 +0200
Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies Arnd Bergmann <arnd@arndb.de> - 2017-05-12 21:40 +0200
csiph-web