[PATCH] USB Elan FTDI: check for driver registration status v2

2007-03-28 Thread Cyrill Gorcunov
This patch adds checking of driver registration status and release allocated resources if it failed. Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]> --- Pete, Ack it please drivers/usb/misc/ftdi-elan.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-28 Thread Pete Zaitcev
On Wed, 28 Mar 2007 20:00:32 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote: > result = usb_register(_elan_driver); > -if (result) > +if (result) { > + destroy_workqueue(status_queue); > + destroy_workqueue(command_queue); > +

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-28 Thread Cyrill Gorcunov
Pete, Luiz check this one please. I've inspected ftdi-elan.c for style and as result the solution I propose is just to add explicit destroying of worqueues if usb_register failed. And Pete, take a look - whoa! - I've renamed error labels :) Cyrill ---

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-28 Thread Cyrill Gorcunov
Pete, Luiz check this one please. I've inspected ftdi-elan.c for style and as result the solution I propose is just to add explicit destroying of worqueues if usb_register failed. And Pete, take a look - whoa! - I've renamed error labels :) Cyrill ---

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-28 Thread Pete Zaitcev
On Wed, 28 Mar 2007 20:00:32 +0400, Cyrill Gorcunov [EMAIL PROTECTED] wrote: result = usb_register(ftdi_elan_driver); -if (result) +if (result) { + destroy_workqueue(status_queue); + destroy_workqueue(command_queue); +

[PATCH] USB Elan FTDI: check for driver registration status v2

2007-03-28 Thread Cyrill Gorcunov
This patch adds checking of driver registration status and release allocated resources if it failed. Signed-off-by: Cyrill Gorcunov [EMAIL PROTECTED] --- Pete, Ack it please drivers/usb/misc/ftdi-elan.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Pete Zaitcev - Tue, Mar 27, 2007 at 10:51:16AM -0700] | On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote: | | > --- a/drivers/usb/misc/ftdi-elan.c | > @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = { | > }; | > static int __init

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Pete Zaitcev
On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote: > --- a/drivers/usb/misc/ftdi-elan.c > @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = { > }; > static int __init ftdi_elan_init(void) > { > -int result; > +int result = 0; Why do

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 02:29:04PM -0300] | Em Tue, 27 Mar 2007 21:01:25 +0400 | Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | | | [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | | | Em Tue, 27 Mar 2007 19:14:05 +0400 | | | Cyrill Gorcunov

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Luiz Fernando N. Capitulino
Em Tue, 27 Mar 2007 21:01:25 +0400 Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | | Em Tue, 27 Mar 2007 19:14:05 +0400 | | Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | | | | | Pete, Luiz | | | | | | what about this one?

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | Em Tue, 27 Mar 2007 19:14:05 +0400 | Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | | | Pete, Luiz | | | | what about this one? | | | | Actually there is just a check for where is error coming from. | | Maybe that is not

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Luiz Fernando N. Capitulino
Em Tue, 27 Mar 2007 19:14:05 +0400 Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | Pete, Luiz | | what about this one? | | Actually there is just a check for where is error coming from. | Maybe that is not the best solution but it allows us to reduce | the calls to 'printk' :) | | P.S. Pete

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
Pete, Luiz what about this one? Actually there is just a check for where is error coming from. Maybe that is not the best solution but it allows us to reduce the calls to 'printk' :) P.S. Pete your patch is good but the message about worqueue creation fail was to print even if we've been

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
Pete, Luiz what about this one? Actually there is just a check for where is error coming from. Maybe that is not the best solution but it allows us to reduce the calls to 'printk' :) P.S. Pete your patch is good but the message about worqueue creation fail was to print even if we've been

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Luiz Fernando N. Capitulino
Em Tue, 27 Mar 2007 19:14:05 +0400 Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | Pete, Luiz | | what about this one? | | Actually there is just a check for where is error coming from. | Maybe that is not the best solution but it allows us to reduce | the calls to 'printk' :) | | P.S. Pete your

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | Em Tue, 27 Mar 2007 19:14:05 +0400 | Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | | | Pete, Luiz | | | | what about this one? | | | | Actually there is just a check for where is error coming from. | | Maybe that is not the

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Luiz Fernando N. Capitulino
Em Tue, 27 Mar 2007 21:01:25 +0400 Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | | Em Tue, 27 Mar 2007 19:14:05 +0400 | | Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | | | | | Pete, Luiz | | | | | | what about this one? | |

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 02:29:04PM -0300] | Em Tue, 27 Mar 2007 21:01:25 +0400 | Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | | | [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300] | | | Em Tue, 27 Mar 2007 19:14:05 +0400 | | | Cyrill Gorcunov

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Pete Zaitcev
On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov [EMAIL PROTECTED] wrote: --- a/drivers/usb/misc/ftdi-elan.c @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = { }; static int __init ftdi_elan_init(void) { -int result; +int result = 0; Why do you need

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-27 Thread Cyrill Gorcunov
[Pete Zaitcev - Tue, Mar 27, 2007 at 10:51:16AM -0700] | On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov [EMAIL PROTECTED] wrote: | | --- a/drivers/usb/misc/ftdi-elan.c | @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = { | }; | static int __init ftdi_elan_init(void) |

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Pete Zaitcev
On Sun, 25 Mar 2007 11:27:33 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote: > This patch adds checking of driver registration status > and if it fails release allocated resources. > + if (status_queue) { > + destroy_workqueue(status_queue); > + status_queue = NULL;

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Luiz Fernando N. Capitulino
Em Mon, 26 Mar 2007 23:33:12 +0400 Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | if usb registration failed we should release all worqueues we've | created and that is the reason why I've changed the code... I see, maybe something like the following (not tested): diff --git

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Mon, Mar 26, 2007 at 03:43:57PM -0300] | | Hi Cyrill, | | Em Sun, 25 Mar 2007 11:27:33 +0400 | Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | | | This patch adds checking of driver registration status | | and if it fails release allocated resources. | | | |

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Luiz Fernando N. Capitulino
Hi Cyrill, Em Sun, 25 Mar 2007 11:27:33 +0400 Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu: | This patch adds checking of driver registration status | and if it fails release allocated resources. | | Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]> | | --- | | Pete, please review the

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Luiz Fernando N. Capitulino
Hi Cyrill, Em Sun, 25 Mar 2007 11:27:33 +0400 Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | This patch adds checking of driver registration status | and if it fails release allocated resources. | | Signed-off-by: Cyrill Gorcunov [EMAIL PROTECTED] | | --- | | Pete, please review the patch

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Cyrill Gorcunov
[Luiz Fernando N. Capitulino - Mon, Mar 26, 2007 at 03:43:57PM -0300] | | Hi Cyrill, | | Em Sun, 25 Mar 2007 11:27:33 +0400 | Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | | | This patch adds checking of driver registration status | | and if it fails release allocated resources. | | | |

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Luiz Fernando N. Capitulino
Em Mon, 26 Mar 2007 23:33:12 +0400 Cyrill Gorcunov [EMAIL PROTECTED] escreveu: | if usb registration failed we should release all worqueues we've | created and that is the reason why I've changed the code... I see, maybe something like the following (not tested): diff --git

Re: [PATCH] USB Elan FTDI: check for driver registration status

2007-03-26 Thread Pete Zaitcev
On Sun, 25 Mar 2007 11:27:33 +0400, Cyrill Gorcunov [EMAIL PROTECTED] wrote: This patch adds checking of driver registration status and if it fails release allocated resources. + if (status_queue) { + destroy_workqueue(status_queue); + status_queue = NULL; +

[PATCH] USB Elan FTDI: check for driver registration status

2007-03-25 Thread Cyrill Gorcunov
This patch adds checking of driver registration status and if it fails release allocated resources. Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]> --- Pete, please review the patch and Ack it then. drivers/usb/misc/ftdi-elan.c | 37 +++-- 1 files changed,

[PATCH] USB Elan FTDI: check for driver registration status

2007-03-25 Thread Cyrill Gorcunov
This patch adds checking of driver registration status and if it fails release allocated resources. Signed-off-by: Cyrill Gorcunov [EMAIL PROTECTED] --- Pete, please review the patch and Ack it then. drivers/usb/misc/ftdi-elan.c | 37 +++-- 1 files changed,