lkml.org 
[lkml]   [2006]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 5/9] ns558: adjust pnp_register_driver signature
On Thu, Mar 02, 2006 at 04:09:37PM -0700, Bjorn Helgaas wrote:
> Remove the assumption that pnp_register_driver() returns the number of
> devices claimed.
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Wouldn't a diff like

--- a/drivers/input/gameport/ns558.c 2006-03-02 12:40:45.000000000 -0700
+++ b/drivers/input/gameport/ns558.c 2006-03-02 12:43:58.000000000 -0700
@@ -258,7 +256,7 @@
{
int i = 0;

- if (pnp_register_driver(&ns558_pnp_driver) >= 0)
+ if (!pnp_register_driver(&ns558_pnp_driver))
pnp_registered = 1;

/*
be enough? The err variable isn't used anywhere else.

> Index: work-mm4/drivers/input/gameport/ns558.c
> ===================================================================
> --- work-mm4.orig/drivers/input/gameport/ns558.c 2006-03-02 12:40:45.000000000 -0700
> +++ work-mm4/drivers/input/gameport/ns558.c 2006-03-02 12:43:58.000000000 -0700
> @@ -256,9 +256,10 @@
>
> static int __init ns558_init(void)
> {
> - int i = 0;
> + int i = 0, err;
>
> - if (pnp_register_driver(&ns558_pnp_driver) >= 0)
> + err = pnp_register_driver(&ns558_pnp_driver);
> + if (!err)
> pnp_registered = 1;
>
> /*
>
>

--
Vojtech Pavlik
Director SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-03 13:58    [W:0.357 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site