Re: How to submit a patch to v4l-dvb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm still trying to get this patch merged. The patch has been improved
with your suggestions and reviewed by Dmitry Torokhov
<dtor@xxxxxxxxxxxxx>, the USB input mantainer. His response is
attached to this mail.

Regards.

2006/7/27, Trent Piepho <xyzzy@xxxxxxxxxxxxx>:
On Thu, 27 Jul 2006, Unai Uribarri wrote:
> Is something wrong in this patch? I tried to follow all the guidelines
> about how to write a patch. Will be eventually merged?

I do not really know anything about how this usb input device stuff works,
so I can't comment on if the patch is really correct or not in that
respect.  The strlcpy to strlcat change does seem strange to me.  It seems
like one of them must have been very wrong.

The linux/usb_input.h header file moved to linux/usb/input.h in 2.6.18, so
you should update the patch to take this into account.

You might want to look at this unapplied patch here to see what must be done
to make usb input stuff work for kernels < 2.6.18, < 2.6.15, and < 2.6.13:
http://linuxtv.org/hg/~tap/compat?cmd=changeset;node=dd9dece7bc70;style=gitweb

If this change is included and not made backward compatible, then
versions.txt should be updated for whatever driver it is that uses this
code.

                                                                                                                                                                                                                                                               
X-Gmail-Received: b63f47c318b49b0566bd2b46018a9a0a69ec229f
Delivered-To: unaiur@xxxxxxxxx
Received: by 10.35.71.3 with SMTP id y3cs248822pyk;
        Sun, 20 Aug 2006 06:03:32 -0700 (PDT)
Received: by 10.70.131.19 with SMTP id e19mr7882556wxd;
        Sun, 20 Aug 2006 06:03:31 -0700 (PDT)
Return-Path: <dtor@xxxxxxxxxxxxx>
Received: from asav09.insightbb.com (gateway.insightbb.com [74.128.0.19])
        by mx.gmail.com with ESMTP id 38si1023669wrl.2006.08.20.06.03.31;
        Sun, 20 Aug 2006 06:03:31 -0700 (PDT)
Received-SPF: pass (gmail.com: domain of dtor@xxxxxxxxxxxxx designates 74.128.0.19 as permitted sender)
Received: from dhcp-74-133-21-20.insightbb.com (HELO mail.corenet.homeip.net) ([74.133.21.20])
  by asav09.insightbb.com with ESMTP; 20 Aug 2006 09:03:31 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AR4FAKb650SBUQ
From: Dmitry Torokhov <dtor@xxxxxxxxxxxxx>
To: Unai Uribarri <unaiur@xxxxxxxxx>
Subject: Re: USB-DVB remote controls
Date: Sun, 20 Aug 2006 09:03:29 -0400
User-Agent: KMail/1.9.3
References: <1156075942.8048.22.camel@xxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <1156075942.8048.22.camel@xxxxxxxxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200608200903.30215.dtor@xxxxxxxxxxxxx>

Hi Unai,

On Sunday 20 August 2006 08:12, Unai Uribarri wrote:
> Hello Dmitry,
> 
> I'm pushing this patch to adapt the DVB-USB remote controls to the
> changes in the USB input subsystem in 2.6.13, 2.6.15 and 2.6.18.
> 
> However, the V4L-DVB folks (the maintainers of dvb-usb-remote.c) are
> reluctant to accept this patch adducing that they aren't USB experts and
> don't understand why this patch is needed. All what I know is that HAL
> needs it to detect the remote control. 
> 
> This change is specially suspicious to them: 
> -	strlcpy(d->rc_phys, "/ir0", sizeof(d->rc_phys));
> +	strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys));
> 

Yes, this is correct change because current code overwrites phys
we made with usb_make_path just a line above. Using usb_to_input_id
and setting cdev -> device link are needed too.

> Since you are the author of that line of code (at least, that's what git
> says), the patch has much more chances of being accepted with your
> approval.
> 
> Can you support me signing this patch?
>

If you remove checks for linux version (you are submitting it for
inclusion in mainline, right? - so they are not needed there) you
can add:

Acked-by: Dmitry Torokhov <dtor@xxxxxxx> 

-- 
Dmitry
# HG changeset patch
# User Unai Uribarri <unaiur@xxxxxxxxx>
# Node ID e83b66e3c1ef6feee217a84f1a40218db548acb3
# Parent  6ddc79dc9d54ce064146b0b6da933b36aa81e513
[PATCH] Sync'ing dvb-usb-remote with changes in USB input subsystem


From: Unai Uribarri <unaiur@xxxxxxxxx>

This patch fixes the physical address and takes into account recent
changes in the USB input subsystem.

Signed-off-by: Unai Uribarri <unaiur@xxxxxxxxx>

diff -r 6ddc79dc9d54 -r e83b66e3c1ef linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c	Sun Jul 23 06:36:05 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c	Fri Jul 28 00:53:24 2006 +0200
@@ -6,6 +6,11 @@
  * This file contains functions for initializing the the input-device and for handling remote-control-queries.
  */
 #include "dvb-usb-common.h"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#include <linux/usb_input.h>
+#endif
 
 /* Remote-control poll function - called every dib->rc_query_interval ms to see
  * whether the remote control has received anything.
@@ -96,7 +101,7 @@ int dvb_usb_remote_init(struct dvb_usb_d
 		return 0;
 
 	usb_make_path(d->udev, d->rc_phys, sizeof(d->rc_phys));
-	strlcpy(d->rc_phys, "/ir0", sizeof(d->rc_phys));
+	strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys));
 
 	d->rc_input_dev = input_allocate_device();
 	if (!d->rc_input_dev)
@@ -107,6 +112,12 @@ int dvb_usb_remote_init(struct dvb_usb_d
 	d->rc_input_dev->keycodemax = KEY_MAX;
 	d->rc_input_dev->name = "IR-receiver inside an USB DVB receiver";
 	d->rc_input_dev->phys = d->rc_phys;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+	usb_to_input_id(d->udev, &d->rc_input_dev->id);
+#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+	d->rc_input_dev->cdev.dev = &d->udev->dev;
+#endif
 
 	/* set the bits for the keys */
 	deb_rc("key map size: %d\n", d->props.rc_key_map_size);



_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux