[7/7,staging] cxd2099/cxd2099.c: Activate cxd2099 buffer mode

Message ID 1494190313-18557-8-git-send-email-jasmin@anw.at (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Jasmin J. May 7, 2017, 8:51 p.m. UTC
  From: Jasmin Jessich <jasmin@anw.at>

Now the cxd2099 buffer mode is activated, but can be deactivated by
setting BUFFER_MODE to 0 at the compiler command line or by editiing
the file.

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
---
 drivers/staging/media/cxd2099/cxd2099.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Mauro Carvalho Chehab June 24, 2017, 7:09 p.m. UTC | #1
Em Sun,  7 May 2017 22:51:53 +0200
"Jasmin J." <jasmin@anw.at> escreveu:

> From: Jasmin Jessich <jasmin@anw.at>
> 
> Now the cxd2099 buffer mode is activated, but can be deactivated by
> setting BUFFER_MODE to 0 at the compiler command line or by editiing
> the file.

Editing the sources to enable a feature doesn't seem nice. If this
feature should be enabled per caller, you should pass a parameter
for the caller driver when binding to it.

> 
> Signed-off-by: Jasmin Jessich <jasmin@anw.at>
> ---
>  drivers/staging/media/cxd2099/cxd2099.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
> index 64de129..dcad557 100644
> --- a/drivers/staging/media/cxd2099/cxd2099.c
> +++ b/drivers/staging/media/cxd2099/cxd2099.c
> @@ -33,7 +33,9 @@
>  
>  #include "cxd2099.h"
>  
> -/* #define BUFFER_MODE 1 */
> +#ifndef BUFFER_MODE
> +#define BUFFER_MODE 1
> +#endif
>  
>  static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount);
>  



Thanks,
Mauro
  

Patch

diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
index 64de129..dcad557 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -33,7 +33,9 @@ 
 
 #include "cxd2099.h"
 
-/* #define BUFFER_MODE 1 */
+#ifndef BUFFER_MODE
+#define BUFFER_MODE 1
+#endif
 
 static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount);