Skip to contentSkip to conversation

au0828: au0828_rc_*() defines cleanup

PATCH New Shuah Khan 1 participant 3 messages Aug 9, 2014 Media (V4L/DVB)

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

cover au0828: au0828_rc_*() defines cleanup

Define au0828_rc_*() stubs to avoid compile errors when VIDEO_AU0828_RC is disabled and avoid the need to enclose au0828_rc_*() in ifdef CONFIG_VIDEO_AU0828_RC in .c files.

This patch series adds stubs and fixes places where ifdef is used.

Shuah Khan (2):
au0828: add au0828_rc_*() stubs for VIDEO_AU0828_RC disabled case
au0828: remove CONFIG_VIDEO_AU0828_RC scope around au0828_rc_*()

 drivers/media/usb/au0828/au0828-core.c |    4 ----
 drivers/media/usb/au0828/au0828.h      |   15 +++++++++++----
 2 files changed, 11 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 1/2 au0828: add au0828_rc_*() stubs for VIDEO_AU0828_RC disabled case

Define au0828_rc_*() stubs to avoid compile errors when VIDEO_AU0828_RC is disabled and avoid the need to enclose au0828_rc_*() in ifdef CONFIG_VIDEO_AU0828_RC in .c files.

---
 drivers/media/usb/au0828/au0828.h |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/media/usb/au0828/au0828.h +11 -4
index 96bec05..fd0916e 100644
@@ -326,7 +326,14 @@ extern struct videobuf_queue_ops au0828_vbi_qops;
 	} while (0)
 
 /* au0828-input.c */
-int au0828_rc_register(struct au0828_dev *dev);
-void au0828_rc_unregister(struct au0828_dev *dev);
-int au0828_rc_suspend(struct au0828_dev *dev);
-int au0828_rc_resume(struct au0828_dev *dev);
+#ifdef CONFIG_VIDEO_AU0828_RC
+extern int au0828_rc_register(struct au0828_dev *dev);
+extern void au0828_rc_unregister(struct au0828_dev *dev);
+extern int au0828_rc_suspend(struct au0828_dev *dev);
+extern int au0828_rc_resume(struct au0828_dev *dev);
+#else
+static inline int au0828_rc_register(struct au0828_dev *dev) { return 0; }
+static inline void au0828_rc_unregister(struct au0828_dev *dev) { }
+static inline int au0828_rc_suspend(struct au0828_dev *dev) { return 0; }
+static inline int au0828_rc_resume(struct au0828_dev *dev) { return 0; }
+#endif
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 2/2 au0828: remove CONFIG_VIDEO_AU0828_RC scope around au0828_rc_*()

In reply to Shuah Khan

Remove CONFIG_VIDEO_AU0828_RC scope around au0828_rc_register() and au0828_rc_unregister() calls in au0828-core

---
 drivers/media/usb/au0828/au0828-core.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/media/usb/au0828/au0828-core.c +0 -4
index eb5f2b1..2090498 100644
@@ -153,9 +153,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
 
 	dprintk(1, "%s()\n", __func__);
 
-#ifdef CONFIG_VIDEO_AU0828_RC
 	au0828_rc_unregister(dev);
-#endif
 	/* Digital TV */
 	au0828_dvb_unregister(dev);
 
@@ -266,10 +264,8 @@ static int au0828_usb_probe(struct usb_interface *interface,
 		pr_err("%s() au0282_dev_register failed\n",
 		       __func__);
 
-#ifdef CONFIG_VIDEO_AU0828_RC
 	/* Remote controller */
 	au0828_rc_register(dev);
-#endif
 
 	/*
 	 * Store the pointer to the au0828_dev so it can be accessed in
Signature · 1 line
1.7.10.4